mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
MPV: always mark dummy frames as reference
If the dummy frame are not created from a reference frame they could be deleted untimely resulting in multithreaded decoder waiting on the current frame to finish. Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.
This commit is contained in:
parent
1e26a48fa2
commit
7b60799aa8
@ -1271,6 +1271,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
||||
return -1;
|
||||
ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 0);
|
||||
ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 1);
|
||||
s->last_picture_ptr->f.reference = 3;
|
||||
}
|
||||
if ((s->next_picture_ptr == NULL ||
|
||||
s->next_picture_ptr->f.data[0] == NULL) &&
|
||||
@ -1282,6 +1283,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
||||
return -1;
|
||||
ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 0);
|
||||
ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 1);
|
||||
s->next_picture_ptr->f.reference = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user