summaryrefslogtreecommitdiff
path: root/libavcodec/h264_picture.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_picture.c
parentace837665362297a761ca92309ece8d7f4fa725a (diff)
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_picture.c')
-rw-r--r--libavcodec/h264_picture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index 81d90d73c2..04bbf028cc 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -172,7 +172,8 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup)
}
if (avctx->hwaccel) {
- if (avctx->hwaccel->end_frame(avctx) < 0)
+ err = avctx->hwaccel->end_frame(avctx);
+ if (err < 0)
av_log(avctx, AV_LOG_ERROR,
"hardware accelerator failed to decode picture\n");
}