mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
avcodec/h264_slice: sync User Data Unregistered SEI buffers across threads
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
449984445e
commit
184fc42b46
@ -439,6 +439,26 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < h->sei.unregistered.nb_buf_ref; i++)
|
||||||
|
av_buffer_unref(&h->sei.unregistered.buf_ref[i]);
|
||||||
|
h->sei.unregistered.nb_buf_ref = 0;
|
||||||
|
|
||||||
|
if (h1->sei.unregistered.nb_buf_ref) {
|
||||||
|
ret = av_reallocp_array(&h->sei.unregistered.buf_ref,
|
||||||
|
h1->sei.unregistered.nb_buf_ref,
|
||||||
|
sizeof(*h->sei.unregistered.buf_ref));
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
for (i = 0; i < h1->sei.unregistered.nb_buf_ref; i++) {
|
||||||
|
h->sei.unregistered.buf_ref[i] = av_buffer_ref(h1->sei.unregistered.buf_ref[i]);
|
||||||
|
if (!h->sei.unregistered.buf_ref[i])
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
h->sei.unregistered.nb_buf_ref++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
h->sei.unregistered.x264_build = h1->sei.unregistered.x264_build;
|
||||||
|
|
||||||
if (!h->cur_pic_ptr)
|
if (!h->cur_pic_ptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user