On Mon, 2011-08-29 at 03:15 +0300, Uoti Urpala wrote:
> On Mon, 2011-08-29 at 01:13 +0200, Luca Barbato wrote:
> > Currently we are misreporting the uncropped/multiple-of-macroblocks h264 
> > dimensions as the image dimensions. That is bogus and wrong.
> 
> I think it's quite a stretch to claim that is a problem caused by the
> part of the code you want to delete.
> 
> I don't remember seeing a proper analysis of the issue. AFAIK what

The actual problem here was that an application was using avctx->height
immediately after avcodec_open2(). The h264 decoder and others do not
set width/height until after at least one frame has been decoded. The
only reason the subject commit made a difference was that without it an
initial value from before avcodec_open2() remained in the field until it
was actually initialized, and it was correct in this case.

IMO the most appropriate "fix" would have been to add a note to the
documentation of the width/height fields saying that they may have
incorrect values until at least one frame has been decoded (unless
someone volunteers to change the decoders to really initialize the
fields already during open), but Luca has already committed the revert.
That doesn't remove the need for documentation updates though - the
width/height values will still not be correctly set during
avcodec_open2(); at most the difference is that whatever value was left
there from any earlier code (correct or incorrect) will stay unchanged.

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to