[FFmpeg-devel] [PATCH] Fix unaligned dsputil call in pngdec.c

Vitor Sessak vitor1001
Sat May 23 17:13:39 CEST 2009


Michael Niedermayer wrote:
> On Sat, May 23, 2009 at 11:51:43AM +0200, Vitor Sessak wrote:
>> $subj, should fix FATE test #296 on Solaris/Sparc. Any suggestion on how to 
>> do this in a less hackish way is welcome.
>>
>> -Vitor
> 
>>  pngdec.c |    6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> ded6ae17c87d1a1ca9bc133f48fb0827dacb6617  png.diff
>> Index: libavcodec/pngdec.c
>> ===================================================================
>> --- libavcodec/pngdec.c	(revision 18855)
>> +++ libavcodec/pngdec.c	(working copy)
>> @@ -526,8 +526,8 @@
>>                      if (!s->tmp_row)
>>                          goto fail;
>>                  }
>> -                /* compressed row */
>> -                s->crow_buf = av_malloc(s->row_size + 1);
>> +                /* compressed row, we want crow_buf+1 to be 16-byte aligned */
> 
>> +                s->crow_buf = (uint8_t *) av_malloc(s->row_size + 16) + 15;
>>                  if (!s->crow_buf)
> 
> do you think the if() will work?

10l, trivially fixed.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: png2.diff
Type: text/x-diff
Size: 934 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090523/ad75faab/attachment.diff>



More information about the ffmpeg-devel mailing list