GNOME Bugzilla – Bug 757948
audio: Do not fail filling info from caps missing channel-mask
Last modified: 2018-11-03 11:43:46 UTC
See commit message
Created attachment 315266 [details] [review] audio: Do not fail filling info from caps missing channel-mask Use the new gst_audio_channel_get_fallback_mask to get some sane values
I don't really like this :) We should never produce caps with invalid channel-mask, if anything whatever has produced the caps should've used the fallback channel-mask (or 0).
True but I have a mkv stream with raw audio that just don't contain the info, we should deal with it fmpov.
(and we should also fix matroskamux or whatever to avoid that to happen in the future! :)
Ah, or you mean matroska demux should use that method and set the channel-mask itself?
Yes, and we should fix matroskamux (but IIRC the channel layout/position stuff in Matroska was a bit overengineered... based on giving each channel a position in a 3 dimensional coordinate system)
We should have a utility to craft a channels mask (the most common) for each number of channels. This currently exist in alsasink, and is probably found at other places. It's a lie, but it's better then failing.
That's exactly what gst_audio_channel_get_fallback_mask() does, yes.
So what shall we do with this then? As I understand it, the choice here is between: - require caps producers to use _get_fallback_mask() (now) - make parse_info_from_caps() use _get_fallback_mask() (this patch) I'm leaning slightly towards forcing producers to do this, so matroskademux in this case. That way when we make up stuff it has to be done explicitly in the element in question and is less likely to be overlooked.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/243.