aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/snowenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-12 23:15:46 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:38 +0200
commitd163eefd4756111d188c40b3ee4b6cd91e8b9d64 (patch)
treef8853253d36018ff6edf0e5aea710aa5a220d7cc /libavcodec/snowenc.c
parentb1a31b32abc19df329cf61fa23febd8252978fd3 (diff)
downloadffmpeg-d163eefd4756111d188c40b3ee4b6cd91e8b9d64.tar.gz
avcodec/me_cmp, motion_est: Sanitize permissible cmp_funcs
Several of the potential choices of comparison functions need an initialized MpegEncContext (initialized for encoding, not only ff_mpv_common_init()) or they crash when called. Modify ff_set_cmp() to check for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r--libavcodec/snowenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 9d64b1efe2..819a7933fe 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -217,7 +217,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
mcf(12,12)
ff_me_cmp_init(&enc->mecc, avctx);
- ret = ff_me_init(&enc->m.me, avctx, &enc->mecc);
+ ret = ff_me_init(&enc->m.me, avctx, &enc->mecc, 0);
if (ret < 0)
return ret;
ff_mpegvideoencdsp_init(&enc->mpvencdsp, avctx);