summaryrefslogtreecommitdiff
path: root/libavcodec/h264dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264dec.c')
-rw-r--r--libavcodec/h264dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 83b3ab3be1..54ded03bd8 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -757,7 +757,8 @@ out:
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) ||
(h->mb_y >= h->mb_height && h->mb_height)) {
- ff_h264_field_end(h, &h->slice_ctx[0], 0);
+ if (h->field_started)
+ ff_h264_field_end(h, &h->slice_ctx[0], 0);
*got_frame = 0;
if (h->output_frame->buf[0]) {