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

Stefano Sabatini git at videolan.org
Sun Apr 14 20:33:46 CEST 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Apr 13 13:16:23 2013 +0200| [f6c9a325b727b807d7e666ea41858dae9ebce916] | committer: Stefano Sabatini

ffmpeg: show error message in case of av_buffersrc_add_frame_flags() failure

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6c9a325b727b807d7e666ea41858dae9ebce916
---

 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);



More information about the ffmpeg-cvslog mailing list