MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / ffmpeg_get_codec_context

Function ffmpeg_get_codec_context

src/FFmpegUtilities.h:149–154  ·  view source on GitHub ↗

Allocate and populate an AVCodecContext from stream codec parameters.

Source from the content-addressed store, hash-verified

147
148// Allocate and populate an AVCodecContext from stream codec parameters.
149inline static AVCodecContext* ffmpeg_get_codec_context(AVStream *av_stream, const AVCodec *av_codec) {
150 AVCodecContext *context = avcodec_alloc_context3(av_codec);
151 if (context)
152 avcodec_parameters_to_context(context, av_stream->codecpar);
153 return context;
154}
155
156#if HAVE_CH_LAYOUT
157inline static AVChannelLayout ffmpeg_default_channel_layout(int channels) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected