mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
audio: More UNPOSITION flag sanity checks
..and turn the GST_WARNING() into a g_warning(). This is a programming error and should be fixed.
This commit is contained in:
parent
a03f70e3cd
commit
de19cfdd8a
1 changed files with 7 additions and 1 deletions
|
@ -676,7 +676,13 @@ gst_audio_info_to_caps (const GstAudioInfo * info)
|
|||
if ((flags & GST_AUDIO_FLAG_UNPOSITIONED) && info->channels > 1
|
||||
&& info->position[0] != GST_AUDIO_CHANNEL_POSITION_NONE) {
|
||||
flags &= ~GST_AUDIO_FLAG_UNPOSITIONED;
|
||||
GST_WARNING ("Unpositioned flag set but channel positions present");
|
||||
g_warning ("Unpositioned audio channel position flag set but "
|
||||
"channel positions present");
|
||||
} else if (!(flags & GST_AUDIO_FLAG_UNPOSITIONED) && info->channels > 1
|
||||
&& info->position[0] == GST_AUDIO_CHANNEL_POSITION_NONE) {
|
||||
flags |= GST_AUDIO_FLAG_UNPOSITIONED;
|
||||
g_warning ("Unpositioned audio channel position flag not set "
|
||||
"but no channel positions present");
|
||||
}
|
||||
|
||||
caps = gst_caps_new_simple ("audio/x-raw",
|
||||
|
|
Loading…
Reference in a new issue