summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2018-01-12 02:02:15 +0100
committerSven Gothel <[email protected]>2018-01-12 02:42:04 +0100
commit7b3fde81b625431000da82fe2d524989448835c5 (patch)
treea0c1d12b830997a1a6cf2f09dbd07e232a9d9690
parent0bbd618792a6441c2593c318672944725f431f50 (diff)
FFMPEG decavcodec: Consider returned error from av_buffersrc_add_frame(..)
-rw-r--r--libhb/decavcodec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 9838a0b51..8b5d367cc 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);