[FFmpeg-devel] [PATCH] VC-1 SP/MP test bitstreams demuxer

Kostya kostya.shishkov
Tue Jan 29 10:28:49 CET 2008


On Mon, Jan 28, 2008 at 02:20:14PM +0100, Michael Niedermayer wrote:
> On Mon, Jan 28, 2008 at 11:26:08AM +0200, Kostya wrote:
> > On Sun, Jan 27, 2008 at 03:23:01PM +0100, Michael Niedermayer wrote:
> > > 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
> > 
> > Here it is. And it works with my patch for generic index (which should be
> > tested more).
> 
> patch looks ok

applied

Now I will test seeking/index creation which got created by the way.
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB




More information about the ffmpeg-devel mailing list