mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
aacparse: fix uninitialized variables in LOAS config reading
On reading LOAS config, flag v=1 and vA=1 combination can occur, leading to warning "Spec says "TBD"...". Returning TRUE on this case while parameters 'sample_rate' and 'channels' are pointing to uninitialized values can end on setting random values as rate and channels on src caps. https://bugzilla.gnome.org/show_bug.cgi?id=755611
This commit is contained in:
parent
866c86dd37
commit
35139ee8b7
1 changed files with 3 additions and 2 deletions
|
@ -655,6 +655,7 @@ gst_aac_parse_read_loas_config (GstAacParse * aacparse, const guint8 * data,
|
||||||
GST_LOG_OBJECT (aacparse, "More data ignored");
|
GST_LOG_OBJECT (aacparse, "More data ignored");
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING_OBJECT (aacparse, "Spec says \"TBD\"...");
|
GST_WARNING_OBJECT (aacparse, "Spec says \"TBD\"...");
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -870,7 +871,7 @@ gst_aac_parse_detect_stream (GstAacParse * aacparse,
|
||||||
|
|
||||||
if (gst_aac_parse_check_loas_frame (aacparse, data, avail, drain,
|
if (gst_aac_parse_check_loas_frame (aacparse, data, avail, drain,
|
||||||
framesize, &need_data_loas)) {
|
framesize, &need_data_loas)) {
|
||||||
gint rate, channels;
|
gint rate = 0, channels = 0;
|
||||||
|
|
||||||
GST_INFO ("LOAS, framesize: %d", *framesize);
|
GST_INFO ("LOAS, framesize: %d", *framesize);
|
||||||
|
|
||||||
|
@ -1212,7 +1213,7 @@ gst_aac_parse_handle_frame (GstBaseParse * parse,
|
||||||
gboolean lost_sync;
|
gboolean lost_sync;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
guint framesize;
|
guint framesize;
|
||||||
gint rate, channels;
|
gint rate = 0, channels = 0;
|
||||||
|
|
||||||
aacparse = GST_AAC_PARSE (parse);
|
aacparse = GST_AAC_PARSE (parse);
|
||||||
buffer = frame->buffer;
|
buffer = frame->buffer;
|
||||||
|
|
Loading…
Reference in a new issue