1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

av_common: drop unused function

Unused since the AVCodecParameters change.
This commit is contained in:
wm4 2017-01-24 08:15:38 +01:00
parent b14fac9afa
commit c06fd19d8f
2 changed files with 0 additions and 24 deletions

View File

@ -50,29 +50,6 @@ int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size)
return 0;
}
// Copy the codec-related fields from st into avctx. This does not set the
// codec itself, only codec related header data provided by libavformat.
// The goal is to initialize a new decoder with the header data provided by
// libavformat, and unlike avcodec_copy_context(), allow the user to create
// a clean AVCodecContext for a manually selected AVCodec.
// This is strictly for decoding only.
void mp_copy_lav_codec_headers(AVCodecContext *avctx, AVCodecContext *st)
{
mp_lavc_set_extradata(avctx, st->extradata, st->extradata_size);
avctx->codec_tag = st->codec_tag;
avctx->bit_rate = st->bit_rate;
avctx->width = st->width;
avctx->height = st->height;
avctx->pix_fmt = st->pix_fmt;
avctx->chroma_sample_location = st->chroma_sample_location;
avctx->sample_rate = st->sample_rate;
avctx->channels = st->channels;
avctx->block_align = st->block_align;
avctx->channel_layout = st->channel_layout;
avctx->bits_per_coded_sample = st->bits_per_coded_sample;
avctx->has_b_frames = st->has_b_frames;
}
// This only copies ffmpeg-native codec parameters. Parameters produced by
// other demuxers must be handled manually.
void mp_set_lav_codec_headers(AVCodecContext *avctx, struct mp_codec_params *c)

View File

@ -31,7 +31,6 @@ struct AVDictionary;
struct mp_log;
int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size);
void mp_copy_lav_codec_headers(AVCodecContext *avctx, AVCodecContext *st);
void mp_set_lav_codec_headers(AVCodecContext *avctx, struct mp_codec_params *c);
AVRational mp_get_codec_timebase(struct mp_codec_params *c);
void mp_set_av_packet(AVPacket *dst, struct demux_packet *mpkt, AVRational *tb);