ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Mon Mar 3 18:07:02 2025 +0100| [edebd1d9a46564ef3a23f0f2db8f98eed4aa7069] | committer: Andreas Rheinhardt
avcodec/mpegvideo_enc: Only set fcode_tab if unset This is in preparation for merging ff_mpeg1_encode_init() into the MPEG-1/2 encoder's init function. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edebd1d9a46564ef3a23f0f2db8f98eed4aa7069 --- libavcodec/mpegvideo_enc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index d2e3ed1d8c..398b06d929 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -283,10 +283,10 @@ static av_cold void mpv_encode_defaults(MpegEncContext *s) ff_mpv_common_defaults(s); - ff_thread_once(&init_static_once, mpv_encode_init_static); - - s->fcode_tab = default_fcode_tab + MAX_MV; - + if (!s->fcode_tab) { + s->fcode_tab = default_fcode_tab + MAX_MV; + ff_thread_once(&init_static_once, mpv_encode_init_static); + } if (!s->y_dc_scale_table) { s->y_dc_scale_table = s->c_dc_scale_table = ff_mpeg1_dc_scale_table; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".