summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_spdif.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/decode/ad_spdif.c')
-rw-r--r--audio/decode/ad_spdif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c
index 7298d9e7d7..eb2e2bb0a9 100644
--- a/audio/decode/ad_spdif.c
+++ b/audio/decode/ad_spdif.c
@@ -171,7 +171,11 @@ static int init_filter(struct dec_audio *da, AVPacket *pkt)
if (!stream)
goto fail;
+#if HAVE_AVCODEC_HAS_CODECPAR
+ stream->codecpar->codec_id = spdif_ctx->codec_id;
+#else
stream->codec->codec_id = spdif_ctx->codec_id;
+#endif
AVDictionary *format_opts = NULL;