mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 10:55:34 +00:00
riff-media: Check if caps are NULL before using them for the first time, not afterwards
Otherwise we'll get a g_critical() before erroring out cleanly on https://samples.mplayerhq.hu/A-codecs/ATRAC3/SND0.AT3
This commit is contained in:
parent
69c1e0d7a9
commit
0846eb5b27
1 changed files with 5 additions and 4 deletions
|
@ -1732,6 +1732,11 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||
*codec_name = g_strdup ("Ogg-AVI");
|
||||
}
|
||||
|
||||
if (caps == NULL) {
|
||||
GST_WARNING ("Unknown WAVE_FORMAT_EXTENSIBLE audio format");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strf != NULL) {
|
||||
/* If channel_mask == 0 and channels > 1 let's
|
||||
* assume default layout as some wav files don't have the
|
||||
|
@ -1750,10 +1755,6 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||
rate_chan = FALSE;
|
||||
}
|
||||
|
||||
if (caps == NULL) {
|
||||
GST_WARNING ("Unknown WAVE_FORMAT_EXTENSIBLE audio format");
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* can anything decode these? pitfdll? */
|
||||
|
|
Loading…
Reference in a new issue