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

Function avcodec_alloc_context3

libavcodec/options.c:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149AVCodecContext *avcodec_alloc_context3(const AVCodec *codec)
150{
151 AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext));
152
153 if (!avctx)
154 return NULL;
155
156 if (init_context_defaults(avctx, codec) < 0) {
157 av_free(avctx);
158 return NULL;
159 }
160
161 return avctx;
162}
163
164void avcodec_free_context(AVCodecContext **pavctx)
165{

Callers 15

LLVMFuzzerTestOneInputFunction · 0.85
mainFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85
ds_openFunction · 0.85
avformat_new_streamFunction · 0.85
codec_closeFunction · 0.85
flac_read_timestampFunction · 0.85
dump_stream_formatFunction · 0.85
dump_stream_groupFunction · 0.85
dash_initFunction · 0.85
old_flac_headerFunction · 0.85
enc_allocFunction · 0.85

Calls 3

init_context_defaultsFunction · 0.85
av_mallocFunction · 0.50
av_freeFunction · 0.50

Tested by 9

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
video_decodeFunction · 0.68
seek_testFunction · 0.68
dump_stream_metaFunction · 0.68
init_encoderFunction · 0.68
init_decoderFunction · 0.68
video_decode_exampleFunction · 0.68