[vlc-commits] demux: mp4: read borked smooth dumps (fix #19484)

Francois Cartegnie git at videolan.org
Mon Jan 15 10:59:26 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 15 10:57:07 2018 +0100| [048084703efda2f7f77d5ebc9b55cb0dbaf93ad1] | committer: Francois Cartegnie

demux: mp4: read borked smooth dumps (fix #19484)

smooth atoms/fourcc with qt header...

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

 modules/demux/mp4/essetup.c | 6 ++++--
 modules/demux/mp4/libmp4.c  | 3 +++
 modules/demux/mp4/libmp4.h  | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index c4e5e74f2d..2c74de80ad 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -707,11 +707,14 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
         break;
 
         case ATOM_WMV3:
+            p_track->p_asf = MP4_BoxGet( p_sample, "ASF " );
+            /* fallsthrough */
+        case ATOM_H264:
+        case VLC_FOURCC('W','V','C','1'):
         {
             MP4_Box_t *p_strf = MP4_BoxGet(  p_sample, "strf", 0 );
             if ( p_strf && BOXDATA(p_strf) )
             {
-                p_track->fmt.i_codec = VLC_CODEC_WMV3;
                 p_track->fmt.video.i_width = BOXDATA(p_strf)->bmiHeader.biWidth;
                 p_track->fmt.video.i_visible_width = p_track->fmt.video.i_width;
                 p_track->fmt.video.i_height = BOXDATA(p_strf)->bmiHeader.biHeight;
@@ -724,7 +727,6 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
                     memcpy( p_track->fmt.p_extra, BOXDATA(p_strf)->p_extra,
                             p_track->fmt.i_extra );
                 }
-                p_track->p_asf = MP4_BoxGet( p_sample, "ASF " );
             }
             break;
         }
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index b15031b937..527dde2e73 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -4504,6 +4504,9 @@ static const struct
     { ATOM_yv12,    MP4_ReadBox_sample_vide,  0 },
     { ATOM_yuv2,    MP4_ReadBox_sample_vide,  0 },
 
+    { ATOM_strf,    MP4_ReadBox_strf,         ATOM_WVC1 }, /* MS smooth */
+    { ATOM_strf,    MP4_ReadBox_strf,         ATOM_H264 }, /* MS smooth */
+
     { ATOM_strf,    MP4_ReadBox_strf,         ATOM_WMV3 }, /* flip4mac */
     { ATOM_ASF ,    MP4_ReadBox_ASF,          ATOM_WMV3 }, /* flip4mac */
     { ATOM_ASF ,    MP4_ReadBox_ASF,          ATOM_wave }, /* flip4mac */
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index dede4545d1..bde7732c8f 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -234,11 +234,13 @@ typedef int64_t stime_t;
 #define ATOM_VP31 VLC_FOURCC( 'V', 'P', '3', '1' )
 #define ATOM_vp31 VLC_FOURCC( 'v', 'p', '3', '1' )
 #define ATOM_h264 VLC_FOURCC( 'h', '2', '6', '4' )
+#define ATOM_H264 VLC_FOURCC( 'H', '2', '6', '4' )
 #define ATOM_qdrw VLC_FOURCC( 'q', 'd', 'r', 'w' )
 #define ATOM_vp08 VLC_FOURCC( 'v', 'p', '0', '8' )
 #define ATOM_vp09 VLC_FOURCC( 'v', 'p', '0', '9' )
 #define ATOM_vp10 VLC_FOURCC( 'v', 'p', '1', '0' )
 #define ATOM_WMV3 VLC_FOURCC( 'W', 'M', 'V', '3' )
+#define ATOM_WVC1 VLC_FOURCC( 'W', 'V', 'C', '1' )
 
 #define ATOM_avc1 VLC_FOURCC( 'a', 'v', 'c', '1' )
 #define ATOM_avc3 VLC_FOURCC( 'a', 'v', 'c', '3' )



More information about the vlc-commits mailing list