mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
h264: only ref cur_pic in update_thread_context if it is initialized
It may be empty if the previous thread's decode call did not contain a valid frame.
This commit is contained in:
parent
9abc80f1ed
commit
0dea4c77cc
@ -553,8 +553,11 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
||||
|
||||
h->cur_pic_ptr = REBASE_PICTURE(h1->cur_pic_ptr, h, h1);
|
||||
ff_h264_unref_picture(h, &h->cur_pic);
|
||||
if ((ret = ff_h264_ref_picture(h, &h->cur_pic, &h1->cur_pic)) < 0)
|
||||
return ret;
|
||||
if (h1->cur_pic.f.buf[0]) {
|
||||
ret = ff_h264_ref_picture(h, &h->cur_pic, &h1->cur_pic);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
h->workaround_bugs = h1->workaround_bugs;
|
||||
h->low_delay = h1->low_delay;
|
||||
|
Loading…
Reference in New Issue
Block a user