You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/h264_slice: use ff_h264_replace_picture when syncing thread contexts
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -379,19 +379,15 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
|||||||
h->droppable = h1->droppable;
|
h->droppable = h1->droppable;
|
||||||
|
|
||||||
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) {
|
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) {
|
||||||
ff_h264_unref_picture(h, &h->DPB[i]);
|
ret = ff_h264_replace_picture(h, &h->DPB[i], &h1->DPB[i]);
|
||||||
if (h1->DPB[i].f->buf[0] &&
|
if (ret < 0)
|
||||||
(ret = ff_h264_ref_picture(h, &h->DPB[i], &h1->DPB[i])) < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
h->cur_pic_ptr = REBASE_PICTURE(h1->cur_pic_ptr, h, h1);
|
h->cur_pic_ptr = REBASE_PICTURE(h1->cur_pic_ptr, h, h1);
|
||||||
ff_h264_unref_picture(h, &h->cur_pic);
|
ret = ff_h264_replace_picture(h, &h->cur_pic, &h1->cur_pic);
|
||||||
if (h1->cur_pic.f->buf[0]) {
|
|
||||||
ret = ff_h264_ref_picture(h, &h->cur_pic, &h1->cur_pic);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
h->enable_er = h1->enable_er;
|
h->enable_er = h1->enable_er;
|
||||||
h->workaround_bugs = h1->workaround_bugs;
|
h->workaround_bugs = h1->workaround_bugs;
|
||||||
|
Reference in New Issue
Block a user