[FFmpeg-devel] [PATCH] Electronic Arts MAD Decoder

Peter Ross pross
Sun Jun 14 11:57:05 CEST 2009


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.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090614/7c4676e0/attachment.pgp>



More information about the ffmpeg-devel mailing list