From a6a3dd0790c67d62736c4593eaa9e8f6de73ef60 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Mon, 9 Feb 2004 22:05:15 +0000 Subject: [PATCH] libs/gst/bytestream/bytestream.c: We should not shout that loud when len is 0. Just return 0 silently. Original commit message from CVS: 2004-02-09 Julien MOUTTE * libs/gst/bytestream/bytestream.c: (gst_bytestream_peek): We should not shout that loud when len is 0. Just return 0 silently. --- ChangeLog | 5 +++++ libs/gst/bytestream/bytestream.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3d7557454e..16ffeb1503 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-09 Julien MOUTTE + + * libs/gst/bytestream/bytestream.c: (gst_bytestream_peek): We should + not shout that loud when len is 0. Just return 0 silently. + 2004-02-09 Julien MOUTTE * gst/gstdata.c: (gst_data_ref): Adding a categorized debug on data_ref diff --git a/libs/gst/bytestream/bytestream.c b/libs/gst/bytestream/bytestream.c index b0a2b72c46..1da70e29cd 100644 --- a/libs/gst/bytestream/bytestream.c +++ b/libs/gst/bytestream/bytestream.c @@ -253,7 +253,9 @@ gst_bytestream_peek (GstByteStream *bs, GstBuffer **buf, guint32 len) g_return_val_if_fail (bs != NULL, 0); g_return_val_if_fail (buf != NULL, 0); - g_return_val_if_fail (len > 0, 0); + + if (len == 0) + return 0; GST_DEBUG ("peek: asking for %d bytes", len);