[FFmpeg-devel] [PATCH] fix playback of partial DV files
Baptiste Coudurier
baptiste.coudurier
Mon Feb 9 22:24:23 CET 2009
Hi Reimar,
Reimar D?ffinger wrote:
> On Sun, Feb 08, 2009 at 06:05:16PM -0800, Baptiste Coudurier wrote:
>> + for (i = 0; i < p->buf_size && (state & 0xffffff3f) !=
>> 0x1f07003f; i++)
>
> Shouldn't it be 0xffffff7f ?
Actually yes, according to specs, this bit must be 0.
Let's hope there aren't bad files in the wild.
> Also you should either initialize state to 0 or i to 4.
>
>> + if (i == p->buf_size) + return 0;
>
> Well, you return 0 when the header start is exactly in the last 4
> bytes. Putting the return inside the loop would avoid that without
> having to duplicate the check.
Yes it seems, changed, thanks for the review.
> Apart from that, is anything speaking against applying those two
> patches? I consider it almost shameful when Quicktime handles
> something better than ffmpeg ;-)
I do think too. I don't like the seek, but it should happen within the
buffer anyway. It might be useful to have a show_be32 function one day.
You could avoid the seek by filling c->buf directly, would this be hard ?
Do you see a need in changing the test in the while loop like in the
probe function ?
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list