summaryrefslogtreecommitdiff
path: root/libavcodec/wmv2enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-28 00:21:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-13 19:36:50 +0100
commit20033c7da4d631385dcb2afc4ed907c3500d8372 (patch)
treec3635da54fe18da8bbc2a72aea24c8e9e8456c5c /libavcodec/wmv2enc.c
parente2cf60f0401c6731026a82f7b5b18b1b0389ee5d (diff)
downloadffmpeg-20033c7da4d631385dcb2afc4ed907c3500d8372.tar.gz
avcodec/msmpegenc: Add MSMPEG4EncContext and move ac_stats to it
Also avoid the allocation by making it part of the context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/wmv2enc.c')
-rw-r--r--libavcodec/wmv2enc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 2622f833b0..227947c146 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -28,7 +28,7 @@
#include "wmv2enc.h"
typedef struct WMV2EncContext {
- MpegEncContext s;
+ MSMPEG4EncContext msmpeg4;
WMV2Context common;
int j_type_bit;
int j_type;
@@ -43,7 +43,7 @@ typedef struct WMV2EncContext {
static int encode_ext_header(WMV2EncContext *w)
{
- MpegEncContext *const s = &w->s;
+ MpegEncContext *const s = &w->msmpeg4.s;
PutBitContext pb;
int code;
@@ -70,13 +70,13 @@ static int encode_ext_header(WMV2EncContext *w)
static av_cold int wmv2_encode_init(AVCodecContext *avctx)
{
WMV2EncContext *const w = avctx->priv_data;
- MpegEncContext *const s = &w->s;
+ MpegEncContext *const s = &w->msmpeg4.s;
s->private_ctx = &w->common;
if (ff_mpv_encode_init(avctx) < 0)
return -1;
- ff_wmv2_common_init(&w->s);
+ ff_wmv2_common_init(s);
avctx->extradata_size = 4;
avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);