You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/mpeg4videodec: update exported AVOptions in the user-facing context
This prevents bogus values being reported on frame multithreaded decoding scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -3495,6 +3495,18 @@ static int mpeg4_update_thread_context(AVCodecContext *dst,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mpeg4_update_thread_context_for_user(AVCodecContext *dst,
|
||||||
|
const AVCodecContext *src)
|
||||||
|
{
|
||||||
|
MpegEncContext *m = dst->priv_data;
|
||||||
|
const MpegEncContext *m1 = src->priv_data;
|
||||||
|
|
||||||
|
m->quarter_sample = m1->quarter_sample;
|
||||||
|
m->divx_packed = m1->divx_packed;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static av_cold void mpeg4_init_static(void)
|
static av_cold void mpeg4_init_static(void)
|
||||||
@@ -3585,6 +3597,7 @@ AVCodec ff_mpeg4_decoder = {
|
|||||||
.pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
|
.pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles),
|
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles),
|
||||||
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context),
|
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context),
|
||||||
|
.update_thread_context_for_user = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context_for_user),
|
||||||
.priv_class = &mpeg4_class,
|
.priv_class = &mpeg4_class,
|
||||||
.hw_configs = (const AVCodecHWConfigInternal *const []) {
|
.hw_configs = (const AVCodecHWConfigInternal *const []) {
|
||||||
#if CONFIG_MPEG4_NVDEC_HWACCEL
|
#if CONFIG_MPEG4_NVDEC_HWACCEL
|
||||||
|
Reference in New Issue
Block a user