On 07/27/2012 10:54 PM, Mashiat Sarker Shakkhar wrote:
> On 7/28/2012 1:15 AM, Luca Barbato wrote:
>> On 07/27/2012 02:49 PM, Mashiat Sarker Shakkhar wrote:
>>> From: Michael Niedermayer <[email protected]>
>>>
>>> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
>>> Signed-off-by: Michael Niedermayer <[email protected]>
>>> ---
>>>   libavcodec/vc1dec.c |    3 +++
>>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
>>> index ac5bfe5..e34e8d2 100644
>>> --- a/libavcodec/vc1dec.c
>>> +++ b/libavcodec/vc1dec.c
>>> @@ -1048,6 +1048,9 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
>>>               mquant = v->altpq;                                 \
>>>           if ((edges&8) && s->mb_y == (s->mb_height - 1))        \
>>>               mquant = v->altpq;                                 \
>>> +        if (!mquant || mquant > 31) {                          \
>>> +            av_log(v->s.avctx, AV_LOG_ERROR, "invalid mquant %d\n",
>>> mquant);   \
>>> +            mquant = 1;                                         \
>>>       }
>>
>> Why setting it to 1 and not erroring out?
> 
> I think erroring out here will be over-protective. Just my opinion.

make it a

av_log(v->s.avctx, AV_LOG_WARNING, "overriding invalid mquant %d\n",
mquant);

then =)

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

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

Reply via email to