ffmpeg: show error message in case of av_buffersrc_add_frame_flags() failure
authorStefano Sabatini <stefasab@gmail.com>
Sat, 13 Apr 2013 11:16:23 +0000 (13:16 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Sun, 14 Apr 2013 18:30:37 +0000 (20:30 +0200)
ffmpeg.c

index 3f26249..ea41645 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1715,12 +1715,12 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
                 break;
         } else
             f = decoded_frame;
-        if(av_buffersrc_add_frame_flags(ist->filters[i]->filter, f,
-                                        AV_BUFFERSRC_FLAG_PUSH)<0) {
-            av_log(NULL, AV_LOG_FATAL, "Failed to inject frame into filter network\n");
+        ret = av_buffersrc_add_frame_flags(ist->filters[i]->filter, f, AV_BUFFERSRC_FLAG_PUSH);
+        if (ret < 0) {
+            av_log(NULL, AV_LOG_FATAL,
+                   "Failed to inject frame into filter network: %s\n", av_err2str(ret));
             exit(1);
         }
-
     }
 
     av_frame_unref(ist->filter_frame);