Based on a patch by Hendrik Leppkes.
Fixes ticket #9176.
Signed-off-by: James Almer <jamrial@gmail.com>
return err;
}
+int ff_h264_update_thread_context_for_user(AVCodecContext *dst,
+ const AVCodecContext *src)
+{
+ H264Context *h = dst->priv_data;
+ const H264Context *h1 = src->priv_data;
+
+ h->is_avc = h1->is_avc;
+ h->nal_length_size = h1->nal_length_size;
+
+ return 0;
+}
+
static int h264_frame_start(H264Context *h)
{
H264Picture *pic;
FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP,
.flush = h264_decode_flush,
.update_thread_context = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context),
+ .update_thread_context_for_user = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context_for_user),
.profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles),
.priv_class = &h264_class,
};
int ff_h264_execute_decode_slices(H264Context *h);
int ff_h264_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src);
+int ff_h264_update_thread_context_for_user(AVCodecContext *dst,
+ const AVCodecContext *src);
void ff_h264_flush_change(H264Context *h);