gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Allow getrange() to return...
authorAndy Wingo <wingo@pobox.com>
Sat, 13 Jan 2007 10:33:41 +0000 (10:33 +0000)
committerAndy Wingo <wingo@pobox.com>
Sat, 13 Jan 2007 10:33:41 +0000 (10:33 +0000)
Original commit message from CVS:
2007-01-13  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Allow
getrange() to return buffers with other caps, while we fix
demuxers and typefind, or otherwise change part-negotiation.txt.

ChangeLog
gst/gstpad.c

index 0f14d77..b616864 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-13  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Allow
+       getrange() to return buffers with other caps, while we fix
+       demuxers and typefind, or otherwise change part-negotiation.txt.
+
 2007-01-12  Andy Wingo  <wingo@pobox.com>
 
        * libs/gst/base/gstbasetransform.c (gst_base_transform_activate):
index 1db9f60..ae6333c 100644 (file)
@@ -3793,11 +3793,21 @@ dropping:
   }
 not_negotiated:
   {
+    /* ideally we want to use the commented-out code, but currently demuxers and
+     * typefind do not follow part-negotiation.txt. When switching into pull
+     * mode, typefind should probably return the found caps from getcaps(), and
+     * demuxers should do the setcaps(). */
+
+#if 0
     gst_buffer_unref (*buffer);
     *buffer = NULL;
     GST_CAT_WARNING_OBJECT (GST_CAT_SCHEDULING, pad,
         "getrange returned buffer of different caps");
     return GST_FLOW_NOT_NEGOTIATED;
+#endif
+    GST_CAT_DEBUG_OBJECT (GST_CAT_SCHEDULING, pad,
+        "getrange returned buffer of different caps");
+    return ret;
   }
 }
 
@@ -3904,11 +3914,21 @@ dropping:
   }
 not_negotiated:
   {
+    /* ideally we want to use the commented-out code, but currently demuxers and
+     * typefind do not follow part-negotiation.txt. When switching into pull
+     * mode, typefind should probably return the found caps from getcaps(), and
+     * demuxers should do the setcaps(). */
+
+#if 0
     gst_buffer_unref (*buffer);
     *buffer = NULL;
     GST_CAT_WARNING_OBJECT (GST_CAT_SCHEDULING, pad,
         "pullrange returned buffer of different caps");
     return GST_FLOW_NOT_NEGOTIATED;
+#endif
+    GST_CAT_DEBUG_OBJECT (GST_CAT_SCHEDULING, pad,
+        "pullrange returned buffer of different caps");
+    return ret;
   }
 }