[FFmpeg-devel] [PATCH] fix playback of partial DV files

Reimar Döffinger Reimar.Doeffinger
Mon Feb 9 21:02:22 CET 2009

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 ?
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.
Apart from that, is anything speaking against applying those two patches?
I consider it almost shameful when Quicktime handles something better
than ffmpeg ;-)

Reimar D?ffinger

More information about the ffmpeg-devel mailing list