[FFmpeg-devel] [PATCH] Electronic Arts MAD Decoder
Vitor Sessak
vitor1001
Sun Jun 14 12:10:31 CEST 2009
Peter Ross wrote:
> On Sun, Jun 14, 2009 at 10:02:41AM +0200, Vitor Sessak wrote:
>> Mike Melanson wrote:
>>> Peter Ross wrote:
>>>> On Sat, Jun 13, 2009 at 09:03:26AM -0700, Mike Melanson wrote:
>>>>> Michael Niedermayer wrote:
>>>>>> looks ok
>>>>> Problem: It doesn't work.
>>>> SVN-r19182 works flawlessly here on linux/ppc (gcc-4.3.0) and linux/x86
>>>> (gcc-4.4.0). The patch has been tested on many MAD samples, including
>>>> those on samples.mplayerhq.hu. My reference '-f crc' values are below.
>> In my box I get a segfault, the attached patch fixes it.
>>
>> -Vitor
>
>> Index: libavcodec/eamad.c
>> ===================================================================
>> --- libavcodec/eamad.c (revision 19188)
>> +++ libavcodec/eamad.c (working copy)
>> @@ -115,7 +115,7 @@
>> static inline void decode_block_intra(MadContext * t, DCTELEM * block)
>> {
>> MpegEncContext *s = &t->s;
>> - int level, i, j, run;
>> + int level, i=0, j, run;
>> RLTable *rl = &ff_rl_mpeg1;
>> const uint8_t *scantable = s->intra_scantable.permutated;
>> int16_t *quant_matrix = s->intra_matrix;
>
> Applied.
Thanks. Since you are at it, eamad.c gives a few compile warnings:
> libavcodec/eamad.c: In function ?decode_frame?:
> libavcodec/eamad.c:189: warning: ?mv_y? may be used uninitialized in this function
> libavcodec/eamad.c:189: note: ?mv_y? was declared here
> libavcodec/eamad.c:189: warning: ?mv_x? may be used uninitialized in this function
> libavcodec/eamad.c:189: note: ?mv_x? was declared here
-Vitor
More information about the ffmpeg-devel
mailing list