From 1c6b8093440dbd44cf6126bdc693f502975493bb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 13 Jul 2006 15:51:05 +0000 Subject: [PATCH] Revert pull-0 fix for release. Disable check. Fixes #347408. Original commit message from CVS: * libs/gst/base/gstbasesrc.c: (gst_base_src_update_length): * tests/check/elements/filesrc.c: (GST_START_TEST): Revert pull-0 fix for release. Disable check. Fixes #347408. --- ChangeLog | 6 ++++++ common | 2 +- libs/gst/base/gstbasesrc.c | 4 ++++ tests/check/elements/filesrc.c | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 460556586d..8cba5ed51f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-13 Wim Taymans + + * libs/gst/base/gstbasesrc.c: (gst_base_src_update_length): + * tests/check/elements/filesrc.c: (GST_START_TEST): + Revert pull-0 fix for release. Disable check. Fixes #347408. + 2006-07-13 Thomas Vander Stichele * libs/gst/dataprotocol/dataprotocol.c: diff --git a/common b/common index dd173e2720..53ecdc0c97 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit dd173e2720ac21e4a47c97705d7ff32271a0ee66 +Subproject commit 53ecdc0c97a2992e5abeddd41d514bc142401e5d diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 3c961beb5c..725e89291f 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -1238,6 +1238,10 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length) *length = maxsize - offset; } } + /* FIXME, remove this check after release. Some elements pull 0 bytes + * and expect an UNEXPECTED return value (id3demux) */ + if (*length == 0) + goto unexpected_length; /* keep track of current position. segment is in bytes, we checked * that above. */ diff --git a/tests/check/elements/filesrc.c b/tests/check/elements/filesrc.c index bb4a3fd32b..2ec7b5d15f 100644 --- a/tests/check/elements/filesrc.c +++ b/tests/check/elements/filesrc.c @@ -186,12 +186,14 @@ GST_START_TEST (test_pull) fail_unless (GST_BUFFER_SIZE (buffer1) == 10); gst_buffer_unref (buffer1); +#if 0 /* enable after 0 bytes pulls are fixed */ /* read 0 bytes at end-1 should return 0 bytes */ ret = gst_pad_get_range (pad, stop - 1, 0, &buffer1); fail_unless (ret == GST_FLOW_OK); fail_unless (buffer1 != NULL); fail_unless (GST_BUFFER_SIZE (buffer1) == 0); gst_buffer_unref (buffer1); +#endif /* read 10 bytes at end-1 should return 1 byte */ ret = gst_pad_get_range (pad, stop - 1, 10, &buffer1);