[vlc-commits] demux: ts: add adts probing
Francois Cartegnie
git at videolan.org
Fri May 18 17:39:12 CEST 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 17 10:25:20 2018 +0200| [87ad4b49c2eb42b20361a9e29fb9a4dba01116bd] | committer: Jean-Baptiste Kempf
demux: ts: add adts probing
(cherry picked from commit 3a8ae5e94f4a51f04a83a18abbd366ed4589b573)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=87ad4b49c2eb42b20361a9e29fb9a4dba01116bd
---
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 206537470f..f09fe9a391 100644
--- a/modules/demux/mpeg/ts_hotfixes.c
+++ b/modules/demux/mpeg/ts_hotfixes.c
@@ -185,6 +185,11 @@ void ProbePES( demux_t *p_demux, ts_pid_t *pid, const uint8_t *p_pesstart, size_
break;
}
}
+ 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 )
@@ -323,6 +328,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 c61256ae09..6103768fa3 100644
--- a/modules/demux/mpeg/ts_pid.h
+++ b/modules/demux/mpeg/ts_pid.h
@@ -72,6 +72,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