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

Stefano Sabatini stefano.sabatini-lala
Sun Dec 28 16:58:01 CET 2008

On date Sunday 2008-12-28 15:36:14 +0100, Vitor Sessak encoded:
> Stefano Sabatini wrote:
> > Hi,
> > 
> > get_video_frame() returns 0 if it didn't get any frame, 1 otherwise,
> > and input_get_frame() is *requested* to get a frame, patch add a
> > check for this.
> Maybe I'm missing something, but it seems that the right fix for this 
> problem would involve using the poll_frame() framework. Does the problem 
> also appears in ffmpeg or is it ffplay specific?

It works fine with ffmpeg, but the current problem with ffplay doesn't
depend on this, it depends on the fact that avcodec_decode_frame()
doesn't necessarily return the decoded frame on the first call as in
this case.

But I see a problem may occurr with ffplay, if the video displaying
thread is requesting a frame and the decode_thread (which is to say
the truth a demux_thread) queue is still empty,
in this scenario a preventive call to avfilter_poll_frame() may help.

FFmpeg = Faboulous and Fostering Marvellous Portable Ecletic Guide

More information about the ffmpeg-devel mailing list