projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0949ba
)
aacparse: Make sure we have enough data in the codec_data to be able to parse it
author
Sebastian Dröge
<sebastian@centricular.com>
Thu, 1 Dec 2016 11:38:16 +0000
(13:38 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Thu, 1 Dec 2016 11:38:52 +0000
(13:38 +0200)
Also error out cleanly if mapping the buffer failed.
https://bugzilla.gnome.org/show_bug.cgi?id=775450
gst/audioparsers/gstaacparse.c
patch
|
blob
|
history
diff --git
a/gst/audioparsers/gstaacparse.c
b/gst/audioparsers/gstaacparse.c
index
d9dc424
..
bf424b2
100644
(file)
--- a/
gst/audioparsers/gstaacparse.c
+++ b/
gst/audioparsers/gstaacparse.c
@@
-306,11
+306,12
@@
gst_aac_parse_sink_setcaps (GstBaseParse * parse, GstCaps * caps)
if (value) {
GstBuffer *buf = gst_value_get_buffer (value);
- if (buf) {
+ if (buf
&& gst_buffer_get_size (buf) >= 2
) {
GstMapInfo map;
guint sr_idx;
- gst_buffer_map (buf, &map, GST_MAP_READ);
+ if (!gst_buffer_map (buf, &map, GST_MAP_READ))
+ return FALSE;
sr_idx = ((map.data[0] & 0x07) << 1) | ((map.data[1] & 0x80) >> 7);
aacparse->object_type = (map.data[0] & 0xf8) >> 3;