gst/audioconvert/gstaudioconvert.c: advertise buffer-frames correctly on sinkpads

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_getcaps):
advertise buffer-frames correctly on sinkpads
This commit is contained in:
Benjamin Otte 2004-04-05 13:18:56 +00:00
parent 577125d382
commit 0db7a00219
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-04-05 Benjamin Otte <otte@gnome.org>
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_getcaps):
advertise buffer-frames correctly on sinkpads
2004-04-05 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/mad/gstmad.c: (gst_mad_get_type), (gst_mad_layer_get_type),

View file

@ -301,7 +301,12 @@ gst_audio_convert_getcaps (GstPad * pad)
structure = gst_structure_copy (structure);
if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) {
gst_structure_set_name (structure, "audio/x-raw-float");
gst_structure_set (structure, "buffer-frames", G_TYPE_INT, 0, NULL);
if (pad == this->sink) {
gst_structure_set (structure, "buffer-frames", GST_TYPE_INT_RANGE, 0,
G_MAXINT, NULL);
} else {
gst_structure_set (structure, "buffer-frames", G_TYPE_INT, 0, NULL);
}
} else {
gst_structure_set_name (structure, "audio/x-raw-int");
gst_structure_remove_field (structure, "buffer-frames");