[vlc-devel] [PATCH] TS demux: es 0x06 fallback to AC-3 audio for incomplete stream

Can Wu wu.canus at gmail.com
Tue Nov 15 11:05:43 CET 2011


Not a good solution, but I had encounter lots of this streams, this fix it.
---
 modules/demux/ts.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index ff3ba66..679f2b0 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -3824,6 +3824,14 @@ static void PMTSetupEs0x06( demux_t *p_demux, ts_pid_t *pid,
         msg_Dbg( p_demux, "    * Stream Component Identifier: %d", p_si->i_component_tag );
     }
 #endif
+
+    /* for some wierd TS we had to fallback to AC-3 audio */
+    if( p_fmt->i_cat == UNKNOWN_ES )
+    {
+        msg_Warn( p_demux, "Unknown es type 0x06 fallback to AC-3 audio!" );
+        p_fmt->i_cat = AUDIO_ES;
+        p_fmt->i_codec = VLC_CODEC_A52;
+    }
 }
 
 static void PMTSetupEs0xEA( demux_t *p_demux, ts_pid_t *pid,
-- 
1.7.7.3




More information about the vlc-devel mailing list