mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mssdemux: fix segfault when trying to access codec_data
Check if codec_data was obtained before trying to use it to prevent a segfault
This commit is contained in:
parent
5948a07324
commit
628461b4d1
1 changed files with 26 additions and 23 deletions
|
@ -627,6 +627,8 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
|
|||
if (!codec_data) {
|
||||
gint codec_data_len;
|
||||
codec_data_str = (gchar *) xmlGetProp (node, (xmlChar *) "WaveFormatEx");
|
||||
|
||||
if (codec_data_str != NULL) {
|
||||
codec_data_len = strlen (codec_data_str) / 2;
|
||||
|
||||
/* a WAVEFORMATEX structure is 18 bytes */
|
||||
|
@ -655,6 +657,7 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
|
|||
"but at least 18 bytes are expected", codec_data_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!codec_data && ((fourcc && strcmp (fourcc, "AACL") == 0) || atag == 255)
|
||||
&& rate && channels) {
|
||||
|
|
Loading…
Reference in a new issue