Allocate and populate an AVCodecContext from stream codec parameters.
| 147 | |
| 148 | // Allocate and populate an AVCodecContext from stream codec parameters. |
| 149 | inline 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 |
| 157 | inline static AVChannelLayout ffmpeg_default_channel_layout(int channels) { |
nothing calls this directly
no outgoing calls
no test coverage detected