summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-15 23:54:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-15 23:58:31 +0100
commit1f273c2bf22c49e5f668debf52c497dabee636c7 (patch)
tree585aaf7c305a1148183b7241ba11596059fd4b50 /ffmpeg.c
parent1509bd3e9ee0e0be94d1771a6514ae60768209b7 (diff)
ffmpeg: check return code from av_vsrc_buffer_add_frame()
Fixed Ticket770 Bug found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 0728c4e255..f151e8433b 100644
--- 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