]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: check return code from av_vsrc_buffer_add_frame()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 15 Dec 2011 22:54:29 +0000 (23:54 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 15 Dec 2011 22:58:31 +0000 (23:58 +0100)
Fixed Ticket770
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 0728c4e255f1c9aae658ab3f56cb23c063e7e121..f151e8433b045fc1d57105945507e4172024c474 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1902,7 +1902,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
                 *frame_sample_aspect = ist->st->sample_aspect_ratio;
             decoded_frame->pts = ist->pts;
 
-            av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, AV_VSRC_BUF_FLAG_OVERWRITE);
+            if((av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, AV_VSRC_BUF_FLAG_OVERWRITE)) < 0){
+                av_log(0, AV_LOG_FATAL, "Failed to inject frame into filter network\n");
+                exit_program(1);
+            }
         }
     }
 #endif