Commit 04808470 authored by François Cartegnie's avatar François Cartegnie 🤞

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

smooth atoms/fourcc with qt header...
parent b8836b92
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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' )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment