[FFmpeg-devel] [PATCH] Seeking and resync support in nuv demuxer

elupus elupus
Sat May 24 11:21:52 CEST 2008

On Sat, 24 May 2008 11:16:57 +0200, elupus wrote:

> Hi,
> Here is a patch too support seeking in nuv files. It adds index generation,
> read_timestamp and arbitrary postion resync support.
> To notice if a stream resync is required (input stream location changed
> outside demuxer), it stores a stream position on each read. Also since
> resync positions in nuv files are quite scarce, it also considers all
> indexed locations as valid.
> I noticed something odd while doing this patch. What is packet.pos supposed
> to mean. In the nuv demuxer it means where in the stream the payload part
> of a demuxpacket starts. This position is not a position where reading can
> start as the header must be read first. So shouldn't the pkt.pos mean the
> location where the header for the packet starts?
> Also too speed up seeks using av_seek_frame_binary, I added index entries
> when a timestamp is found using read_timestamp. However wouldn't it be
> better to add this to av_seek_frame_binary? perhaps only when
> AVFMT_GENERIC_INDEX is set in format.
> On the note of AVFMT_GENERIC_INDEX, that only works if the stream is set to
> require parsing. Non parsed packets are not considered. Even if they have
> Joakim

And the classic of forgetting the attachment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nuv.patch
Type: text/x-patch
Size: 5057 bytes
Desc: Attached file: nuv.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080524/a86457f5/attachment.bin>

More information about the ffmpeg-devel mailing list