From d1aa5369f6fdfe71c4800f75647e20a3bc7f172c Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 5 Jan 2003 14:20:12 +0000 Subject: [PATCH] Moved a check for NULL buffer from gst_pad_pull to be a little earlier. Original commit message from CVS: Moved a check for NULL buffer from gst_pad_pull to be a little earlier. Fixed 2 bs_print format specifiers wtay, please check this and let me know if you would prefer changes like this to be pre-approved --- common | 2 +- libs/gst/bytestream/bytestream.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common b/common index 4a7bc52a89..2a7d1c564c 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 4a7bc52a893bdd9fefa9fabe460c827822a9e0f2 +Subproject commit 2a7d1c564cbf64d94cb04fb8615afb761e89f80c diff --git a/libs/gst/bytestream/bytestream.c b/libs/gst/bytestream/bytestream.c index 729a42f52e..129543a0e5 100644 --- a/libs/gst/bytestream/bytestream.c +++ b/libs/gst/bytestream/bytestream.c @@ -145,14 +145,14 @@ gst_bytestream_get_next_buf (GstByteStream *bs) bs_print ("get_next_buf: pulling buffer"); nextbuf = gst_pad_pull (bs->pad); + if (!nextbuf) + return FALSE; + if (GST_IS_EVENT (nextbuf)) { bs->event = GST_EVENT (nextbuf); return FALSE; } - if (!nextbuf) - return FALSE; - ts = GST_BUFFER_TIMESTAMP (nextbuf); if (ts != GST_CLOCK_TIME_NONE) bs->last_ts = ts; @@ -416,7 +416,7 @@ gst_bytestream_flush_fast (GstByteStream *bs, guint32 len) while (len > 0) { headbuf = GST_BUFFER (bs->buflist->data); - bs_print ("flush: analyzing buffer that's %d bytes long, offset %d", GST_BUFFER_SIZE (headbuf), + bs_print ("flush: analyzing buffer that's %d bytes long, offset %llu", GST_BUFFER_SIZE (headbuf), GST_BUFFER_OFFSET (headbuf)); /* if there's enough to complete the flush */ @@ -625,7 +625,7 @@ gst_bytestream_print_status (GstByteStream * bs) buf = GST_BUFFER (walk->data); walk = g_slist_next (walk); - bs_print ("STATUS: buffer starts at %d and is %d bytes long", GST_BUFFER_OFFSET (buf), GST_BUFFER_SIZE (buf)); + bs_print ("STATUS: buffer starts at %llu and is %d bytes long", GST_BUFFER_OFFSET (buf), GST_BUFFER_SIZE (buf)); } }