]> granicus.if.org Git - handbrake/commitdiff
FFMPEG decavcodec: Consider returned error from av_buffersrc_add_frame(..)
authorSven Gothel <sgothel@jausoft.com>
Fri, 12 Jan 2018 01:02:15 +0000 (02:02 +0100)
committerBradley Sepos <bradley@bradleysepos.com>
Tue, 29 May 2018 03:56:18 +0000 (23:56 -0400)
libhb/decavcodec.c

index 28d260596ecad5bd8a3f13d1be10a91f6080f225..f12e20df505bf0a2554ebdf60a7a93cc2aaec22e 100644 (file)
@@ -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);