summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/audio.c1
-rw-r--r--player/video.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c
index 2a0614c259..1cc85ad357 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -389,6 +389,7 @@ int init_audio_decoder(struct MPContext *mpctx, struct track *track)
d_audio->global = mpctx->global;
d_audio->opts = mpctx->opts;
d_audio->header = track->stream;
+ d_audio->codec = track->stream->codec;
d_audio->try_spdif = true;
diff --git a/player/video.c b/player/video.c
index f713a86f41..05f2f5667f 100644
--- a/player/video.c
+++ b/player/video.c
@@ -325,6 +325,7 @@ int init_video_decoder(struct MPContext *mpctx, struct track *track)
d_video->log = mp_log_new(d_video, mpctx->log, "!vd");
d_video->opts = mpctx->opts;
d_video->header = track->stream;
+ d_video->codec = track->stream->codec;
d_video->fps = d_video->header->codec->fps;
if (mpctx->vo_chain)
d_video->hwdec_info = mpctx->vo_chain->hwdec_info;