diff options
author | Sven Gothel <[email protected]> | 2018-01-12 02:02:15 +0100 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2018-05-28 23:56:18 -0400 |
commit | 2d6441de7700303e0ca1896bd0b6db0509ded3d2 (patch) | |
tree | 354ee129da04f0f772b42fc2e4addbe9402b7876 /libhb/decavcodec.c | |
parent | 05147501d0d332ee767e909cdf6bed6340cf0d0a (diff) |
FFMPEG decavcodec: Consider returned error from av_buffersrc_add_frame(..)
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 28d260596..f12e20df5 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1294,8 +1294,12 @@ static void filter_video(hb_work_private_t *pv) { int result; - av_buffersrc_add_frame(pv->video_filters.input, pv->frame); - result = av_buffersink_get_frame(pv->video_filters.output, pv->frame); + result = av_buffersrc_add_frame(pv->video_filters.input, pv->frame); + if (result < 0) { + hb_error("filter_video: failed to add frame"); + } else { + result = av_buffersink_get_frame(pv->video_filters.output, pv->frame); + } while (result >= 0) { hb_buffer_t * buf = copy_frame(pv); |