summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-15 20:34:45 +0100
committerwm4 <wm4@nowhere>2016-02-15 20:34:45 +0100
commitf2b039da77fc66119d556e575822c2b8d328cdaf (patch)
tree658de5151cc968bfeb79f222a181afac926b390b /audio/decode/ad_lavc.c
parentf219a48dca7dbd525c1611b1d579947a3dd9b82b (diff)
downloadmpv-f2b039da77fc66119d556e575822c2b8d328cdaf.tar.bz2
mpv-f2b039da77fc66119d556e575822c2b8d328cdaf.tar.xz
audio/video: expose codec info as separate field
Preparation for the timeline rewrite. The codec will be able to change, the stream header not.
Diffstat (limited to 'audio/decode/ad_lavc.c')
-rw-r--r--audio/decode/ad_lavc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index edc9f3c0f0..eeb4526f13 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -77,8 +77,7 @@ static int init(struct dec_audio *da, const char *decoder)
struct ad_lavc_params *opts = mpopts->ad_lavc_params;
AVCodecContext *lavc_context;
AVCodec *lavc_codec;
- struct sh_stream *sh = da->header;
- struct mp_codec_params *c = sh->codec;
+ struct mp_codec_params *c = da->codec;
struct priv *ctx = talloc_zero(NULL, struct priv);
da->priv = ctx;
@@ -216,8 +215,8 @@ static int decode_packet(struct dec_audio *da, struct demux_packet *mpkt,
if (lavc_chmap.num != avctx->channels)
mp_chmap_from_channels(&lavc_chmap, avctx->channels);
if (priv->force_channel_map) {
- if (lavc_chmap.num == da->header->codec->channels.num)
- lavc_chmap = da->header->codec->channels;
+ if (lavc_chmap.num == da->codec->channels.num)
+ lavc_chmap = da->codec->channels;
}
mp_audio_set_channels(mpframe, &lavc_chmap);