[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:39:02 CEST 2019


vlc/vlc-3.0 | branch: master | Hyeon-Ju Lee <zorurione at gmail.com> | Mon May 13 07:21:38 2019 +0900| [3946d69adb542d51214a901750f2ace43e51b829] | 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>
(cherry picked from commit d77998a74ba1f9bbf2def0260dcb81e4f9f9498f)

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

 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 3e638c12e1..b7e8fb9413 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2871,7 +2871,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