diff libmpdemux/demux_lavf.c @ 31925:616375aefdda

Print subtitle type also for internally-supported types with a libavcodec decoder.
author reimar
date Sat, 21 Aug 2010 16:04:18 +0000
parents 88eef0d997e4
children 77b4e83fe42d
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Sat Aug 21 11:54:04 2010 +0000
+++ b/libmpdemux/demux_lavf.c	Sat Aug 21 16:04:18 2010 +0000
@@ -461,7 +461,10 @@
     }
     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)