On 11/08/13 16:43, Anton Khirnov wrote:
> 
> On Sun, 11 Aug 2013 16:30:59 +0200, Luca Barbato <[email protected]> wrote:
>> CC: [email protected]
>> ---
>>
>> It should cover all the cases through all the codebase.
>>
>>  libavcodec/utils.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
>> index ebec08b..e296fab 100644
>> --- a/libavcodec/utils.c
>> +++ b/libavcodec/utils.c
>> @@ -753,7 +753,9 @@ int ff_reget_buffer(AVCodecContext *avctx, AVFrame 
>> *frame)
>>      }
>>
>>      av_image_copy(frame->data, frame->linesize, tmp.data, tmp.linesize,
>> -                  frame->format, frame->width, frame->height);
>> +                  frame->format,
>> +                  FFMIN(frame->width, tmp.width),
>> +                  FFMIN(frame->height, tmp.height));
>>
>>      av_frame_unref(&tmp);
>>
> 
> Can this happen in a normal use case?

Yep.

> I mean wouldn't it be better to returning an error instead?

It isn't an exactly an _error_. You miss a reference frame, the decoder
resizes and conceal and reget crashes.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to