[FFmpeg-devel] [PATCH] avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext

James Almer jamrial at gmail.com
Sat Jul 21 02:30:19 EEST 2018


On 7/20/2018 8:23 PM, Michael Niedermayer wrote:
> On Thu, Jul 19, 2018 at 10:54:23PM -0300, James Almer wrote:
>> Certain AVCodecParameters, like the contents of the extradata, may be changed
>> by the init() function of any of the bitstream filters in the chain.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> Things worked fine without this until now by pure chance. vp9_superframe_split
>> doesn't use extradata, and those hardware decoders inserting h264_mp4toannexb
>> and hevc_mp4toannexb passed the extradata to functions that could handle it
>> unfiltered.
>>
>>  libavcodec/decode.c | 4 ++++
>>  1 file changed, 4 insertions(+)
> 
> this breaks:
> ./ffmpeg -i https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png -bitexact -pix_fmt rgba -f framecrc -
> ...
> [apng @ 0x2d431c0] chunk too big
> [apng @ 0x2d44380] chunk too big
> [apng @ 0x2d45b40] chunk too big
> [apng @ 0x2d472c0] chunk too big
> [apng @ 0x2d48a40] chunk too big
> [apng @ 0x2d4a1c0] chunk too big
> [apng @ 0x2d4b940] chunk too big
> [apng @ 0x2d4d0c0] chunk too big
> [apng @ 0x2d4e840] chunk too big
> [apng @ 0x2d4ffc0] chunk too big
> [apng @ 0x2d5fc00] chunk too big
> [apng @ 0x2d612c0] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d62900] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d431c0] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d44380] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d45b40] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d472c0] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d48a40] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d4a1c0] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input
> [apng @ 0x2d4b940] chunk too big
> Error while decoding stream #0:0: Invalid data found when processing input

I can't reproduce this. Are you sure it was this patch and not some
other change in your tree?


More information about the ffmpeg-devel mailing list