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

Michael Niedermayer michaelni
Sun Jun 8 13:04:27 CEST 2008


On Sun, Jun 08, 2008 at 12:31:12AM +0200, Reimar D?ffinger wrote:
> On Sat, Jun 07, 2008 at 11:07:54PM +0200, Michael Niedermayer wrote:
> > On Sat, Jun 07, 2008 at 07:40:18PM +0200, Reimar D?ffinger wrote:
> > > > +                av_add_index_entry(s->streams[frametype == NUV_VIDEO ? ctx->v_id : ctx->a_id]
> > > > +                                 , pos, dts, size + HDRSIZE, 0, hdr[2] == 0 ? AVINDEX_KEYFRAME : 0);
> > > 
> > > And either way I really think this should not be done here at least.
> > 
> > That one should be fine, other demuxers do it as well
> 
> Well, IMO either this is desirable in general, then it should be done in some layer
> above, if not it should still be done in some layer above just
> conditionally.

read_timestamp() searches for a timestamp in a specific stream, the call
above adds timestamps for any stream.

If you now suggest redesign read_timestamp() so it always returns the first
found and keep the whole stream check outside then theres a problem. And that
are containers which have fewer points where reading can start than
timestamps. 
<can start here> <timestamp stream 0> <timestamp stream 1> <can start here> ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080608/0643c297/attachment.pgp>



More information about the ffmpeg-devel mailing list