[FFmpeg-cvslog] avfilter/lavfutils/ff_load_image: Return error if no frame could be decoded

Michael Niedermayer git at videolan.org
Sat Aug 16 01:42:30 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 16 01:31:37 2014 +0200| [65f05eff0a5d4319c7a3cd9cfbb982972b800cdc] | committer: Michael Niedermayer

avfilter/lavfutils/ff_load_image: Return error if no frame could be decoded

Based-on suggestion by JULIAN GARDNER <joolzg at btinternet.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/lavfutils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c
index ebdf8f8..80310d2 100644
--- a/libavfilter/lavfutils.c
+++ b/libavfilter/lavfutils.c
@@ -77,6 +77,8 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
     ret = avcodec_decode_video2(codec_ctx, frame, &frame_decoded, &pkt);
     if (ret < 0 || !frame_decoded) {
         av_log(log_ctx, AV_LOG_ERROR, "Failed to decode image from file\n");
+        if (ret >= 0)
+            ret = -1;
         goto end;
     }
 



More information about the ffmpeg-cvslog mailing list