Based-on suggestion by JULIAN GARDNER <joolzg@btinternet.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Unified · Split
| @@ -77,6 +77,8 @@ int ff_load_image(uint8_t *data[4], int linesize[4], · 76 unmodified lines | ||
| 77 | 77 | ret = avcodec_decode_video2(codec_ctx, frame, &frame_decoded, &pkt); |
| 78 | 78 | if (ret < 0 || !frame_decoded) { |
| 79 | 79 | av_log(log_ctx, AV_LOG_ERROR, "Failed to decode image from file\n"); |
| 80 | + if (ret >= 0) | |
| 81 | + ret = -1; | |
| 80 | 82 | goto end; |
| 81 | 83 | } |
| 82 | 84 | |