From 4243da4ff42e306b3622b181e12f5cd127d21414 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 30 Mar 2022 23:28:24 +0200 Subject: avcodec/codec_internal: Use union for FFCodec decode/encode callbacks This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt --- libavcodec/s302menc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/s302menc.c') diff --git a/libavcodec/s302menc.c b/libavcodec/s302menc.c index 737fc94697..b6f9501bf2 100644 --- a/libavcodec/s302menc.c +++ b/libavcodec/s302menc.c @@ -179,7 +179,7 @@ const FFCodec ff_s302m_encoder = { AV_CODEC_CAP_VARIABLE_FRAME_SIZE, .priv_data_size = sizeof(S302MEncContext), .init = s302m_encode_init, - .encode2 = s302m_encode2_frame, + FF_CODEC_ENCODE_CB(s302m_encode2_frame), .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, -- cgit v1.2.3