gst-libs/gst/riff/riff-media.c: Protect against unexpected NULL strf_data buffer.

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
Protect against unexpected NULL strf_data buffer.
This commit is contained in:
Tim-Philipp Müller 2006-04-29 16:25:58 +00:00
parent 0774022d5b
commit b981f0999b
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2006-04-29 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
Protect against unexpected NULL strf_data buffer.
2006-04-29 Thomas Vander Stichele <thomas at apestaart dot org>
* tests/check/elements/audioconvert.c: (verify_convert),

View file

@ -879,9 +879,9 @@ gst_riff_create_audio_caps (guint16 codec_id,
guint32 subformat_guid[4];
const guint8 *data;
if (GST_BUFFER_SIZE (strf_data) != 22) {
if (strf_data == NULL || GST_BUFFER_SIZE (strf_data) != 22) {
GST_WARNING ("WAVE_FORMAT_EXTENSIBLE data size is %d (expected: 22)",
GST_BUFFER_SIZE (strf_data));
(strf_data) ? GST_BUFFER_SIZE (strf_data) : -1);
return NULL;
}