[vlc-commits] demux: mp4: fix can't recognize clcp media type's closed caption

Hyeon-Ju Lee git at videolan.org
Mon May 20 12:37:27 CEST 2019


vlc | branch: master | Hyeon-Ju Lee <zorurione at gmail.com> | Mon May 13 07:21:38 2019 +0900| [d77998a74ba1f9bbf2def0260dcb81e4f9f9498f] | committer: Francois Cartegnie

demux: mp4: fix can't recognize clcp media type's closed caption

in TrackCreateES() don't compare case of i_handler is ATOM_clcp
It makes can't create track for clcp media type
print this debug messages and vlc player can't recognize closed caption

debug messages:
    mp4 demux debug: track[Id 0x4] read 32 samples length:80s
    mp4 demux error: cannot create es for track[Id 0x4]
    mp4 demux debug: ignoring track[Id 0x4]

I tested by using this sample videos:
    https://sampleplatform.ccextractor.org/sample/download/45
    https://sampleplatform.ccextractor.org/sample/download/130

reference:
    https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW87
Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

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

 modules/demux/mp4/mp4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 9f4e9cc710..b882c84dd7 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3000,7 +3000,8 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
     case SPU_ES:
         if ( ( p_sample->i_handler != ATOM_text &&
                p_sample->i_handler != ATOM_subt &&
-               p_sample->i_handler != ATOM_sbtl ) ||
+               p_sample->i_handler != ATOM_sbtl &&
+               p_sample->i_handler != ATOM_clcp ) ||
              !SetupSpuES( p_demux, p_track, p_sample ) )
            return VLC_EGENERIC;
         break;



More information about the vlc-commits mailing list