[FFmpeg-devel] [PATCH] libavfilter-soc: make ffplay.c:request_input_frame() check for got_frame

Michael Niedermayer michaelni
Sun Jan 11 19:18:46 CET 2009


On Sun, Jan 11, 2009 at 07:10:33PM +0100, Stefano Sabatini wrote:
> On date Sunday 2009-01-11 18:20:21 +0100, Michael Niedermayer encoded:
> > On Sun, Jan 11, 2009 at 05:29:19PM +0100, Stefano Sabatini wrote:
> > > On date Sunday 2009-01-11 15:20:29 +0100, Michael Niedermayer encoded:
> [...]
> > > Index: libavfilter-soc/ffmpeg/ffplay.c
> > > ===================================================================
> > > --- libavfilter-soc.orig/ffmpeg/ffplay.c	2009-01-11 17:16:17.000000000 +0100
> > > +++ libavfilter-soc/ffmpeg/ffplay.c	2009-01-11 17:19:53.000000000 +0100
> > > @@ -1473,15 +1473,16 @@
> > >      AVPacket pkt;
> > >      int got_picture = 0;
> > >  
> > > +    do {
> > >      if(get_video_frame(priv->is, priv->frame, &pts, &pkt, &got_picture) < 0)
> > >          return -1;
> > >  
> > > +    if (got_picture) {
> > >      /* FIXME: until I figure out how to hook everything up to the codec
> > >       * right, we're just copying the entire frame. */
> > >      picref = avfilter_get_video_buffer(link, AV_PERM_WRITE);
> > >      av_picture_copy((AVPicture *)&picref->data, (AVPicture *)priv->frame,
> > >                      picref->pic->format, picref->w, picref->h);
> > > -    av_free_packet(&pkt);
> > >  
> > >      picref->pts = pts;
> > >      picref->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio;
> > > @@ -1489,6 +1490,10 @@
> > >      avfilter_draw_slice(link, 0, picref->h);
> > >      avfilter_end_frame(link);
> > >      avfilter_unref_pic(picref);
> > > +    }
> > > +
> > > +    av_free_packet(&pkt);
> > > +    } while(!got_picture);
> > >  
> > >      return 0;
> > >  }
> > 
> > while(!(ret= get_video_frame(priv->is, priv->frame, &pts, &pkt)))
> >     av_free_packet(&pkt);
> 
> ...

ok


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

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20090111/754e563b/attachment.pgp>



More information about the ffmpeg-devel mailing list