vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Thu May 17 
10:25:20 2018 +0200| [3a8ae5e94f4a51f04a83a18abbd366ed4589b573] | committer: 
Francois Cartegnie

demux: ts: add adts probing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a8ae5e94f4a51f04a83a18abbd366ed4589b573
---

 modules/demux/mpeg/ts_hotfixes.c | 6 ++++++
 modules/demux/mpeg/ts_pid.h      | 1 +
 2 files changed, 7 insertions(+)

diff --git a/modules/demux/mpeg/ts_hotfixes.c b/modules/demux/mpeg/ts_hotfixes.c
index 65bbe42bdb..4a79b40d75 100644
--- a/modules/demux/mpeg/ts_hotfixes.c
+++ b/modules/demux/mpeg/ts_hotfixes.c
@@ -171,6 +171,11 @@ void ProbePES( demux_t *p_demux, ts_pid_t *pid, const 
uint8_t *p_pesstart, size_
         {
             pid->probed.i_fourcc = VLC_CODEC_MPGA;
         }
+        else if( p_data[0] == 0xFF && (p_data[1] & 0xF2) == 0xF0 )
+        {
+            pid->probed.i_fourcc = VLC_CODEC_MP4A; /* ADTS */
+            pid->probed.i_original_fourcc = VLC_FOURCC('A','D','T','S');
+        }
     }
     /* VIDEO STREAM */
     else if( i_stream_id >= 0xE0 && i_stream_id <= 0xEF )
@@ -309,6 +314,7 @@ void MissingPATPMTFixup( demux_t *p_demux )
                 continue;
 
             es_format_Init(&esstreams[j].fmt, p_pid->probed.i_cat, 
p_pid->probed.i_fourcc);
+            esstreams[j].fmt.i_original_fourcc = 
p_pid->probed.i_original_fourcc;
 
             if( VLC_SUCCESS !=
                 FillPMTESParams(mux_standard, &esstreams[j].fmt, 
&esstreams[j].ts, &esstreams[j].pes ) )
diff --git a/modules/demux/mpeg/ts_pid.h b/modules/demux/mpeg/ts_pid.h
index d727adf2e3..3a0e6bcffd 100644
--- a/modules/demux/mpeg/ts_pid.h
+++ b/modules/demux/mpeg/ts_pid.h
@@ -74,6 +74,7 @@ struct ts_pid_t
     struct
     {
         vlc_fourcc_t i_fourcc;
+        vlc_fourcc_t i_original_fourcc;
         int i_cat;
         int i_pcr_count;
         uint8_t i_stream_id;

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to