[FFmpeg-devel] [PATCH] ffmpeg: handle the case when get_filtered_frame() fails

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri May 20 01:02:26 CEST 2011


---
 ffmpeg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index fb644ad..b6ee7e3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1690,7 +1690,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
                 while (frame_available) {
                     AVRational ist_pts_tb;
                     if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ost->output_video_filter)
-                        get_filtered_video_frame(ost->output_video_filter, &picture, &ost->picref, &ist_pts_tb);
+                        if (get_filtered_video_frame(ost->output_video_filter, &picture, &ost->picref, &ist_pts_tb) < 0)
+                            goto cont;
                     if (ost->picref)
                         ist->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
 #endif
-- 
1.7.2.3



More information about the ffmpeg-devel mailing list