[FFmpeg-devel] [PATCH] movie video source

Stefano Sabatini stefano.sabatini-lala
Tue Jan 4 17:58:14 CET 2011


On date Saturday 2011-01-01 02:22:17 +0100, Michael Niedermayer encoded:
> On Fri, Dec 31, 2010 at 04:35:30PM +0100, Stefano Sabatini wrote:
> > On date Thursday 2010-12-30 01:03:38 +0100, Michael Niedermayer encoded:
> > > On Tue, Dec 28, 2010 at 02:42:33PM +0100, Stefano Sabatini wrote:
> [...]
> > > > +        // Is this a packet from the video stream?
> > > > +        if (packet.stream_index == movie->stream_idx) {
> > > > +            // Decode video frame
> > > > +            avcodec_decode_video2(movie->codec_ctx, movie->frame, &frame_finished, &packet);
> > > > +
> > > > +            // Did we get a video frame?
> > > > +            if (frame_finished) {
> > > > +                movie->picref =
> > > > +                    avfilter_get_video_buffer_ref_from_arrays(movie->frame->data, movie->frame->linesize,
> > > > +                                                              AV_PERM_READ,
> > > > +                                                              outlink->format, outlink->w, outlink->h);
> >  
> > > > +                movie->picref->pts = packet.pts;
> > > 
> > > this is wrong
> > > 
> > > 
> > > > +                movie->picref->pos = packet.pos;
> > > 
> > > so is this
> > 
> > wtf why?
> 
> see your favorit video player or reordered_opaque

What do you suggest to do, to make the cmdutils.c PtsCorrectionContext
API public and use it (av_pts_correction_init(),
av_pts_correction_guess()) or to duplicate the code?

I'm supposing you want to keep the same logic of ffplay.c (and maybe 
add a decoder_reorder_pts param).
-- 
FFmpeg = Foolish Freak Mythic Philosophical Everlasting Gadget



More information about the ffmpeg-devel mailing list