[vlc-commits] demux: mp4: read borked smooth dumps (fix #19484)
Francois Cartegnie
git at videolan.org
Mon Jan 15 11:05:25 CET 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 15 10:57:07 2018 +0100| [f05ab95dcc08bd54ae02ab97bbda29b082f1f3e0] | committer: Francois Cartegnie
demux: mp4: read borked smooth dumps (fix #19484)
smooth atoms/fourcc with qt header...
(cherry picked from commit 048084703efda2f7f77d5ebc9b55cb0dbaf93ad1)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f05ab95dcc08bd54ae02ab97bbda29b082f1f3e0
---
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 2f1b001284..1294eb2c53 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -706,11 +706,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;
@@ -723,7 +726,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 5c62e6a852..091bf5f2df 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -4542,6 +4542,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 9dcd7980cf..ae48098dd7 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