audiopanorama: fix negotiation and unit test
Must remove a possibly-fixed channel-mask field if we're going to set unfixed channels on the structure, or a different channel count.
This commit is contained in:
parent
407bf06dc4
commit
0fa3992e37
@ -334,9 +334,11 @@ gst_audio_panorama_transform_caps (GstBaseTransform * base,
|
|||||||
if (direction == GST_PAD_SRC) {
|
if (direction == GST_PAD_SRC) {
|
||||||
GST_INFO ("allow 1-2 channels");
|
GST_INFO ("allow 1-2 channels");
|
||||||
gst_structure_set (structure, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
|
gst_structure_set (structure, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
|
||||||
|
gst_structure_remove_field (structure, "channel-mask");
|
||||||
} else {
|
} else {
|
||||||
GST_INFO ("allow 2 channels");
|
GST_INFO ("allow 2 channels");
|
||||||
gst_structure_set (structure, "channels", G_TYPE_INT, 2, NULL);
|
gst_structure_set (structure, "channels", G_TYPE_INT, 2, NULL);
|
||||||
|
gst_structure_remove_field (structure, "channel-mask");
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user