diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 03:31:37 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 03:34:34 +0400 |
commit | 65f05eff0a5d4319c7a3cd9cfbb982972b800cdc (patch) | |
tree | fe588dbe19041116b0b57b91df68e611cce07e9e /libavfilter | |
parent | 11aab8d6cb3bac84a228bfe68e0533e4c2667bdb (diff) |
avfilter/lavfutils/ff_load_image: Return error if no frame could be decoded
Based-on suggestion by JULIAN GARDNER <joolzg@btinternet.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/lavfutils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index ebdf8f8f31..80310d2fea 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; } |