[vlc-commits] demux: ts: add adts probing

Francois Cartegnie git at videolan.org
Thu May 17 10:26:42 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 17 10:25:20 2018 +0200| [8c6eef765cf3fa174fd0265e3736d8f1870d311d] | committer: Francois Cartegnie

demux: ts: add adts probing

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

 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..6f4944f383 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;



More information about the vlc-commits mailing list