[FFmpeg-devel] [PATCH] rmdec.c: merge old/new packet reading code

Kostya kostya.shishkov
Sun Mar 15 20:13:03 CET 2009


On Sun, Mar 15, 2009 at 09:57:51AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Mar 14, 2009 at 1:27 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> > Probably rm_assemble_video_frame() should set the flags according to the
> > frame it read.
> 
> Thinking about it, attached is a quickfix with what the original code
> intended to do. It's imperfect because it might not index all
> indexable chunks (i.e. false negatives), but at least it won't index
> more bad stuff than what the original intention was (the only one I
> can think of right now is video frames with remaining_len set).

I think that's more appropriate then indexing false positives. I have
seen decoding errors after seek in ffplay with .rmvb many times.

> I'd
> like to apply this before anything else because I fear that this
> self-indexing will silently break some special cases and cause
> hard-to-debug/track seeking bugs. I hope the patch is small enough.
> Basically, it:
> 
> - makes the 'seq' parameter to ff_rm_parse_packet() work
> - moves the index writing to directly after ff_rm_parse_packet(),
> rather than a few calls later, this is just because even if we skip
> this, we still want to write the index entry (without this, we miss
> pretty much miss all chances to write an index entry)
> - uses the flags parameter before rather than after the
> ff_rm_parse_packet() call to decide whether to write an index entry,
> because ff_rm_parse_packet() may overwrite its value (we need the
> overwritten value also)
> 
> Ronald

OK as a temporary solution. It would be interesting to compare current
code against index though.





More information about the ffmpeg-devel mailing list