[FFmpeg-devel] Strange construct on libavcodec/flicvideo.c

David Bolt 7c6ebd986448736acd2250be77d2cc38
Tue May 27 23:46:24 CEST 2008


On Tue, 27 May 2008, Mike Melanson wrote:-

>Albert Astals Cid wrote:
>> El Tuesday 27 May 2008 12:05:12 Aurelien Jacobs va escriure:
>>> On Tue, 27 May 2008 11:29:02 +0200
>>>
>>> Albert Astals Cid <aastals at tv-wan.es> wrote:
>>>> pixel_ptr = y_ptr;
>>>> pixel_countdown = s->avctx->width;
>>>> while (pixel_countdown > 0) {
>>>>    *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[pixel_ptr]);
>>>>    pixel_ptr += 2;
>>>> }
>>> There is no such construct in current svn version.
>>
>> Really? then you should be running a different svn version than me. Line 590
>> to 595 here.
>
>I see it, in a block marked "#ifdef BIGENDIAN", which makes it even
>stranger. It only affects FLX files according to comments. I suppose no
>one has ever tested this. I know I have not added a FATE test for it yet.

It's been like that since revision 9335, and it's a little curious that
no-one has noticed it before now. However, looking at the following
parts of the file that have the same

while (pixel_countdown > 0 ) {
}

loops, it seems that there is a missing

pixel_count--;

The attached patch adds one.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flicvideo.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080527/2a5aa1ef/attachment.txt>
-------------- next part --------------

Regards,
        David Bolt

-- 
Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys
SUSE 10.1 32bit  | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0b3
SUSE 10.1 64bit  | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6      | TOS 4.02            | openSUSE 10.3 PPC   | RISC OS 3.11



More information about the ffmpeg-devel mailing list