[FFmpeg-devel] [PATCH] libavfilter-soc: make ffplay.c:request_input_frame() check for got_frame
Stefano Sabatini
stefano.sabatini-lala
Sun Jan 11 19:10:33 CET 2009
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);
...
--
FFmpeg = Funny and Friendly Mind-dumbing Puritan Esoteric Geek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-for-got-frame.patch
Type: text/x-diff
Size: 647 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090111/5e011bc4/attachment.patch>
More information about the ffmpeg-devel
mailing list