vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Nov 9 16:31:36 2018 +0100| [e4e320983c2839fb1c0c1f6ae40905d75369a07e] | committer: Francois Cartegnie
demux: libmp4: add missing/use brands defines > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4e320983c2839fb1c0c1f6ae40905d75369a07e --- modules/demux/mp4/libmp4.h | 5 +++++ modules/demux/mp4/mp4.c | 2 +- modules/demux/smooth/playlist/ForgedInitSegment.cpp | 8 ++++---- modules/mux/mp4/libmp4mux.c | 6 +++--- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h index 15c00ce420..18d0473f00 100644 --- a/modules/demux/mp4/libmp4.h +++ b/modules/demux/mp4/libmp4.h @@ -36,12 +36,17 @@ typedef int64_t stime_t; #define BRAND_3gp7 VLC_FOURCC( '3', 'g', 'p', '7' ) #define BRAND_isml VLC_FOURCC( 'i', 's', 'm', 'l' ) #define BRAND_isom VLC_FOURCC( 'i', 's', 'o', 'm' ) +#define BRAND_iso2 VLC_FOURCC( 'i', 's', 'o', '2' ) +#define BRAND_iso6 VLC_FOURCC( 'i', 's', 'o', '6' ) #define BRAND_qt__ VLC_FOURCC( 'q', 't', ' ', ' ' ) #define BRAND_f4v VLC_FOURCC( 'f', '4', 'v', ' ' ) /* Adobe Flash */ #define BRAND_dash VLC_FOURCC( 'd', 'a', 's', 'h' ) +#define BRAND_smoo VLC_FOURCC( 's', 'm', 'o', 'o' ) /* Internal use */ #define BRAND_mp41 VLC_FOURCC( 'm', 'p', '4', '1' ) +#define BRAND_av01 VLC_FOURCC( 'a', 'v', '0', '1' ) #define BRAND_avc1 VLC_FOURCC( 'a', 'v', 'c', '1' ) #define BRAND_M4A VLC_FOURCC( 'M', '4', 'A', ' ' ) +#define BRAND_piff VLC_FOURCC( 'p', 'i', 'f', 'f' ) #define BRAND_mif1 VLC_FOURCC( 'm', 'i', 'f', '1' ) /* heif */ #define BRAND_msf1 VLC_FOURCC( 'm', 's', 'f', '1' ) /* heif */ #define BRAND_heic VLC_FOURCC( 'h', 'e', 'i', 'c' ) /* heif */ diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index 59f09a16af..556700f06a 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -827,7 +827,7 @@ static int Open( vlc_object_t * p_this ) { msg_Dbg( p_demux, "DASH Stream" ); } - else if (BOXDATA(p_ftyp)->i_compatible_brands[i] == VLC_FOURCC('s', 'm', 'o', 'o') ) + else if (BOXDATA(p_ftyp)->i_compatible_brands[i] == BRAND_smoo) { msg_Dbg( p_demux, "Handling VLC Smooth Stream" ); } diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp index 419c710643..001a6d86f6 100644 --- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp +++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp @@ -297,11 +297,11 @@ block_t * ForgedInitSegment::buildMoovBox() block_t *moov = box->b; free(box); - mp4mux_SetBrand(muxh, VLC_FOURCC('i','s','m','l'), 0x01); + mp4mux_SetBrand(muxh, BRAND_isml, 0x01); mp4mux_AddExtraBrand(muxh, BRAND_isom); - mp4mux_AddExtraBrand(muxh, VLC_FOURCC('p','i','f','f')); - mp4mux_AddExtraBrand(muxh, VLC_FOURCC('i','s','o','2')); - mp4mux_AddExtraBrand(muxh, VLC_FOURCC('s','m','o','o')); + mp4mux_AddExtraBrand(muxh, BRAND_piff); + mp4mux_AddExtraBrand(muxh, BRAND_iso2); + mp4mux_AddExtraBrand(muxh, BRAND_smoo); box = mp4mux_GetFtyp(muxh); if(box) diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c index b204c84c3e..1e28967a42 100644 --- a/modules/mux/mp4/libmp4mux.c +++ b/modules/mux/mp4/libmp4mux.c @@ -94,8 +94,8 @@ static void mp4mux_AddExtraBrandForFormat(mp4mux_handle_t *h, const es_format_t mp4mux_AddExtraBrand(h, BRAND_hevc); break; case VLC_CODEC_AV1: - mp4mux_AddExtraBrand(h, VLC_FOURCC('a','v','0','1')); - mp4mux_AddExtraBrand(h, VLC_FOURCC('i','s','o','6')); + mp4mux_AddExtraBrand(h, BRAND_av01); + mp4mux_AddExtraBrand(h, BRAND_iso6); break; case VLC_CODEC_MP4V: case VLC_CODEC_DIV1: @@ -2263,7 +2263,7 @@ bool mp4mux_CanMux(vlc_object_t *p_obj, const es_format_t *p_fmt, case VLC_CODEC_TTML: /* Special case with smooth headers where we need to force frag TTML */ /* TTML currently not supported in sout, until we can keep original timestamps */ - return i_brand == VLC_FOURCC('s', 'm', 'o', 'o'); + return i_brand == BRAND_smoo; case VLC_CODEC_QTXT: case VLC_CODEC_TX3G: case VLC_CODEC_WEBVTT: _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
