aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-08-05 19:54:41 +0200
committerwm4 <nfxjfg@googlemail.com>2015-08-06 11:05:02 +0200
commit94c0df79c7e8205b9e0ae560bc4ac831c231abb8 (patch)
tree975bfc9e70b316768b59d4f008de22f16a8b393d /libavcodec/h264.c
parentace837665362297a761ca92309ece8d7f4fa725a (diff)
downloadffmpeg-94c0df79c7e8205b9e0ae560bc4ac831c231abb8.tar.gz
lavc: propagate hwaccel errors
At least the new videotoolbox decoder does not actually set a frame if end_frame fails. This causes the API to return success and signals that a picture was decoded, even though AVFrame->data[0] is NULL. Fix this by propagating end_frame errors.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8b575bee2e..c4ab3fabad 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1844,7 +1844,8 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
if (avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)
decode_postinit(h, 1);
- ff_h264_field_end(h, &h->slice_ctx[0], 0);
+ if ((ret = ff_h264_field_end(h, &h->slice_ctx[0], 0)) < 0)
+ return ret;
/* Wait for second field. */
*got_frame = 0;