[FFmpeg-devel] [PATCH] ffmpeg: show error message in case of av_buffersrc_add_frame_flags() failure

Stefano Sabatini stefasab at gmail.com
Sat Apr 13 14:04:02 CEST 2013


---
 ffmpeg.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 3f26249..ea41645 100644
--- 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);
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list