diff options
-rw-r--r-- | src/picture.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/picture.c b/src/picture.c index bebc4dd..7046ed1 100644 --- a/src/picture.c +++ b/src/picture.c @@ -194,8 +194,12 @@ int dav1d_thread_picture_alloc(Dav1dContext *const c, Dav1dFrameContext *const f dav1d_ref_dec(&c->itut_t35_ref); c->itut_t35 = NULL; + // Don't clear these flags from c->frame_flags if the frame is not visible. + // This way they will be added to the next visible frame too. + const int flags_mask = (f->frame_hdr->show_frame || c->output_invisible_frames) + ? 0 : (PICTURE_FLAG_NEW_SEQUENCE | PICTURE_FLAG_NEW_OP_PARAMS_INFO); p->flags = c->frame_flags; - c->frame_flags = 0; + c->frame_flags &= flags_mask; p->visible = f->frame_hdr->show_frame; if (have_frame_mt) { |