[FFmpeg-devel] [PATCH] rmdec.c: correctly skip indexes

Ronald S. Bultje rsbultje
Mon Mar 9 22:41:09 CET 2009


Hi Reimar,

On Mon, Mar 9, 2009 at 4:40 PM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> Why not reusing the len variable? Also the -14 is common etc.
> I consider e.g. this simpler:
> len = get_be16(pb);
> url_fskip(pb, 2);
> n_pkts = get_be32(pb);
> if (len == 20) // only index header
> ?/// ?add probably forgotten size of index entries
> ?len += npkts * 14;
> else if (len != 20 + n_ptks * 14)
> ?av_log...
> // skip index and not yet read parts of header
> len -= 14;

Because I'm stupid. This looks much better indeed, I'll post a pretty
patch based on this later tonight.

Ronald




More information about the ffmpeg-devel mailing list