[vlc-commits] demux: mp4: use extradata from stsd/glbl
Francois Cartegnie
git at videolan.org
Wed Nov 20 09:00:53 CET 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Nov 20 14:26:23 2019 +0900| [262ece8d4aafa7ed68f0afd64e5e782dce1c431c] | committer: Francois Cartegnie
demux: mp4: use extradata from stsd/glbl
refs #23078 #23080
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=262ece8d4aafa7ed68f0afd64e5e782dce1c431c
---
modules/demux/mp4/essetup.c | 7 +++++++
modules/demux/mp4/libmp4.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 6b5209b0a6..5a689402ac 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -59,6 +59,13 @@ static void SetupGlobalExtensions( mp4_track_t *p_track, MP4_Box_t *p_sample )
p_track->fmt.i_bitrate = BOXDATA(p_btrt)->i_avg_bitrate;
}
}
+
+ const MP4_Box_t *p_glbl = MP4_BoxGet( p_sample, "glbl" );
+ if( p_glbl && p_glbl->data.p_binary && p_glbl->data.p_binary->p_blob )
+ {
+ CopyExtradata( p_glbl->data.p_binary->p_blob,
+ p_glbl->data.p_binary->i_blob, &p_track->fmt );
+ }
}
static void SetupESDS( demux_t *p_demux, mp4_track_t *p_track, const MP4_descriptor_decoder_config_t *p_decconfig )
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index a0beef3b91..4b431977d4 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -4858,7 +4858,7 @@ static const struct
{ ATOM_dec3, MP4_ReadBox_dec3, 0 },
{ ATOM_dvc1, MP4_ReadBox_dvc1, ATOM_vc1 },
{ ATOM_fiel, MP4_ReadBox_fiel, 0 },
- { ATOM_glbl, MP4_ReadBox_Binary, ATOM_FFV1 },
+ { ATOM_glbl, MP4_ReadBox_Binary, 0 },
{ ATOM_enda, MP4_ReadBox_enda, 0 },
{ ATOM_iods, MP4_ReadBox_iods, 0 },
{ ATOM_pasp, MP4_ReadBox_pasp, 0 },
More information about the vlc-commits
mailing list