mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
qtdemux: make sure compatible brands buffer exists before dereferencing it
This commit is contained in:
parent
c7b5df91a9
commit
45ff905771
1 changed files with 3 additions and 1 deletions
|
@ -4844,7 +4844,7 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major)
|
||||||
if (major) {
|
if (major) {
|
||||||
return ((qtdemux->major_brand & GST_MAKE_FOURCC (255, 255, 0, 0)) ==
|
return ((qtdemux->major_brand & GST_MAKE_FOURCC (255, 255, 0, 0)) ==
|
||||||
GST_MAKE_FOURCC ('3', 'g', 0, 0));
|
GST_MAKE_FOURCC ('3', 'g', 0, 0));
|
||||||
} else {
|
} else if (qtdemux->comp_brands != NULL) {
|
||||||
guint8 *data = GST_BUFFER_DATA (qtdemux->comp_brands);
|
guint8 *data = GST_BUFFER_DATA (qtdemux->comp_brands);
|
||||||
guint size = GST_BUFFER_SIZE (qtdemux->comp_brands);
|
guint size = GST_BUFFER_SIZE (qtdemux->comp_brands);
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
@ -4856,6 +4856,8 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major)
|
||||||
size -= 4;
|
size -= 4;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue