[FFmpeg-devel] [PATCH] VC-1 SP/MP test bitstreams demuxer
Michael Niedermayer
michaelni
Sun Jan 27 15:23:01 CET 2008
On Sun, Jan 27, 2008 at 03:47:34PM +0200, Kostya wrote:
> On Sun, Jan 27, 2008 at 12:57:50PM +0100, Michael Niedermayer wrote:
> > On Sun, Jan 27, 2008 at 10:19:54AM +0200, Kostya wrote:
> > [...]
> >
> > >
> > > > > + if(av_get_packet(pb, pkt, frame_size) < 0)
> > > > > + return AVERROR(EIO);
> > > > > + pkt->flags |= keyframe ? PKT_FLAG_KEY : 0;
> > > > > +
> > > > > + return pkt->size;
> > > > > +}
> > > > > +
> > > > > +AVInputFormat vc1t_demuxer = {
> > > > > + "vc1test",
> > > > > + "VC1 test bitstream format",
> > > > > + 0,
> > > > > + vc1t_probe,
> > > > > + vc1t_read_header,
> > > > > + vc1t_read_packet,
> > > > > +};
> > > >
> > > > does seeking work?
> > > > if no try setting AVFMT_GENERIC_INDEX and try again
> > > > if still not, check if the generic code builds the index properly
> > > > and fix it, this should be just a 1 or 2 line fix in utils.c
> > >
> > > It won't work as index is built only for parsed formats.
> >
> > yes, i meant you could fix that :)
> > though thats of course independant of this patch ...
>
> You could as well ;)
yes i could ... ;)
but its always better if someone else does the work :))))
> Here's an untested proof of concept
ok if it works and is tested :)
>
> > [...]
> > > + if(!s->streams[0]->r_frame_rate.num)
> > > + pkt->pts = pts;
> >
> > you are missusing r_frame_rate.num here
> > actually i dont see what would prevent lavf to set it to a non zero value
> > in av_find_stream_info() and then break this ...
>
> How should I redo it then?
well
many ways
one would be to check if timebase.den == 1000
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20080127/272b64ac/attachment.pgp>
More information about the ffmpeg-devel
mailing list