[FFmpeg-devel] [PATCH] rmdec.c: support for multirate files

Reimar Döffinger Reimar.Doeffinger
Tue Dec 30 15:06:10 CET 2008


On Tue, Dec 30, 2008 at 08:42:58AM -0500, Ronald S. Bultje wrote:
> -
> -            len -= 12;
> +            if (state >> 16 == 1)
> +                url_fskip(pb, 1);
> +            len -= 12 + (state >> 16 & 0x1);

len -= 12;
if (state >> 16 == 1) {
    url_fskip(pb, 1);
    len--;
}

Is IMHO simpler and more correct (what if some future change would allow
(state >> 16) == 3 ? Your code would certainly break, my suggestion is at
least somewhat correct.)
Though "if (state > 0xFFFF)" might be even better...




More information about the ffmpeg-devel mailing list