summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_lavf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r--libmpdemux/demux_lavf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index cecf5589de..136e2a8ef6 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -469,7 +469,10 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
}
if (stream_type) {
AVCodec *avc = avcodec_find_decoder(codec->codec_id);
- mp_msg(MSGT_DEMUX, MSGL_INFO, "[lavf] stream %d: %s (%s), -%cid %d", i, stream_type, avc ? avc->name : "unknown", *stream_type, stream_id);
+ const char *codec_name = avc ? avc->name : "unknown";
+ if (!avc && *stream_type == 's' && demuxer->s_streams[stream_id])
+ codec_name = sh_sub_type2str(((sh_sub_t *)demuxer->s_streams[stream_id])->type);
+ mp_msg(MSGT_DEMUX, MSGL_INFO, "[lavf] stream %d: %s (%s), -%cid %d", i, stream_type, codec_name, *stream_type, stream_id);
if (lang && lang->value && *stream_type != 'v')
mp_msg(MSGT_DEMUX, MSGL_INFO, ", -%clang %s", *stream_type, lang->value);
if (title && title->value)