[FFmpeg-devel] [PATCH 2/7] avcodec/h261dec, vc1dec: Don't set write-only macroblock dimensions

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Oct 14 23:05:17 EEST 2023


Michael Niedermayer:
> On Sat, Oct 07, 2023 at 02:40:26AM +0200, Andreas Rheinhardt wrote:
>> They are generally set in ff_mpv_init_context_frame()
>> (mostly called by ff_mpv_common_init()); setting them
>> somewhere else should be avoided.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
>> ---
>>  libavcodec/h261dec.c | 6 ------
>>  libavcodec/vc1dec.c  | 3 ---
>>  2 files changed, 9 deletions(-)
> 
> This seems to break several vc1 files like
> vlcticket/5887/Cruise\ 2012_07_29_19_02_16.wmv
> 
> I think its there:
> https://streams.videolan.org/issues/5887/
> 

Thanks for testing, much appreciated. The reason for this is line 968,
where mb_height is used before ff_mpv_common_init() is called. This
actually points to a potential bug: On frame size changes (can happen in
ff_vc1_decode_entry_point()), this line would still use the old value of
mb_height. But I don't want to deal with this at the moment, so I'll
simply drop the vc1dec.c stuff from this patch and apply only h261dec.c.

- Andreas



More information about the ffmpeg-devel mailing list