gst/audioconvert/gstaudioconvert.c: advertise buffer-frames correctly on sinkpads
authorBenjamin Otte <otte@gnome.org>
Mon, 5 Apr 2004 13:18:56 +0000 (13:18 +0000)
committerBenjamin Otte <otte@gnome.org>
Mon, 5 Apr 2004 13:18:56 +0000 (13:18 +0000)
Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_getcaps):
advertise buffer-frames correctly on sinkpads

ChangeLog
gst/audioconvert/gstaudioconvert.c

index c20bb50..ce46d60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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),
index 2be4df1..f15c34a 100644 (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");