MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / wmv2_encode_init

Function wmv2_encode_init

libavcodec/wmv2enc.c:222–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222static av_cold int wmv2_encode_init(AVCodecContext *avctx)
223{
224 WMV2EncContext *const w = avctx->priv_data;
225 MPVEncContext *const s = &w->msmpeg4.m.s;
226 int ret;
227
228 w->msmpeg4.m.encode_picture_header = wmv2_encode_picture_header;
229 s->encode_mb = wmv2_encode_mb;
230
231 ret = ff_mpv_encode_init(avctx);
232 if (ret < 0)
233 return ret;
234
235 avctx->extradata_size = WMV2_EXTRADATA_SIZE;
236 avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
237 if (!avctx->extradata)
238 return AVERROR(ENOMEM);
239
240 encode_ext_header(w);
241
242 return 0;
243}
244
245const FFCodec ff_wmv2_encoder = {
246 .p.name = "wmv2",

Callers

nothing calls this directly

Calls 3

ff_mpv_encode_initFunction · 0.85
encode_ext_headerFunction · 0.85
av_malloczFunction · 0.50

Tested by

no test coverage detected