[vlc-commits] demux: mp4: split quicktime text codecs

Francois Cartegnie git at videolan.org
Tue Jan 9 21:24:53 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan  9 16:54:32 2018 +0100| [7d9bbcd70e7f1628a1ad15d9704c8316696b7130] | committer: Francois Cartegnie

demux: mp4: split quicktime text codecs

too much confusion and incompatible sample desc

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

 include/vlc_fourcc.h        | 1 +
 modules/demux/mp4/essetup.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 02e65f37b4..0a4f82046c 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -530,6 +530,7 @@
 #define VLC_CODEC_USF       VLC_FOURCC('u','s','f',' ')
 #define VLC_CODEC_OGT       VLC_FOURCC('o','g','t',' ')
 #define VLC_CODEC_CVD       VLC_FOURCC('c','v','d',' ')
+#define VLC_CODEC_QTXT      VLC_FOURCC('q','t','x','t')
 #define VLC_CODEC_TX3G      VLC_FOURCC('t','x','3','g')
 #define VLC_CODEC_ARIB_A    VLC_FOURCC('a','r','b','a')
 #define VLC_CODEC_ARIB_C    VLC_FOURCC('a','r','b','c')
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 4d3d212350..c4e5e74f2d 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -1272,7 +1272,10 @@ int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
             if(!p_text)
                 return 0;
 
-            p_track->fmt.i_codec = VLC_CODEC_TX3G;
+            if( p_sample->i_type == VLC_FOURCC( 't', 'e', 'x', 't' ) )
+                p_track->fmt.i_codec = VLC_CODEC_QTXT;
+            else
+                p_track->fmt.i_codec = VLC_CODEC_TX3G;
 
             if( GetDWBE(p_text->p_data) & 0xC0000000 )
             {



More information about the vlc-commits mailing list