summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264_slice.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index aad5484..e6b7998 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1571,6 +1571,12 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
* one except for reference purposes. */
h->first_field = 1;
h->cur_pic_ptr = NULL;
+ } else if (h->cur_pic_ptr->reference & DELAYED_PIC_REF) {
+ /* This frame was already output, we cannot draw into it
+ * anymore.
+ */
+ h->first_field = 1;
+ h->cur_pic_ptr = NULL;
} else {
/* Second field in complementary pair */
h->first_field = 0;
OpenPOWER on IntegriCloud