From eae8170d947531d3fb8f584876f1c7e066e42457 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <slomo@circular-chaos.org>
Date: Mon, 27 Oct 2008 09:12:33 +0000
Subject: gst/flv/gstflvdemux.c: Improve debugging a bit when pulling a buffer
 from upstream fails.

Original commit message from CVS:
* gst/flv/gstflvdemux.c: (gst_flv_demux_pull_range):
Improve debugging a bit when pulling a buffer from upstream fails.
---
 gst/flv/gstflvdemux.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'gst')

diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c
index 028dded8..a9984323 100644
--- a/gst/flv/gstflvdemux.c
+++ b/gst/flv/gstflvdemux.c
@@ -314,14 +314,17 @@ gst_flv_demux_pull_range (GstFLVDemux * demux, GstPad * pad, guint64 offset,
 
   ret = gst_pad_pull_range (pad, offset, size, buffer);
   if (G_UNLIKELY (ret != GST_FLOW_OK)) {
-    GST_WARNING_OBJECT (demux, "failed when pulling %d bytes", size);
+    GST_WARNING_OBJECT (demux,
+        "failed when pulling %d bytes from offset %" G_GUINT64_FORMAT ": %s",
+        size, offset, gst_flow_get_name (ret));
     *buffer = NULL;
     return ret;
   }
 
   if (G_UNLIKELY (*buffer && GST_BUFFER_SIZE (*buffer) != size)) {
-    GST_WARNING_OBJECT (demux, "partial pull got %d when expecting %d",
-        GST_BUFFER_SIZE (*buffer), size);
+    GST_WARNING_OBJECT (demux,
+        "partial pull got %d when expecting %d from offset %" G_GUINT64_FORMAT,
+        GST_BUFFER_SIZE (*buffer), size, offset);
     gst_buffer_unref (*buffer);
     ret = GST_FLOW_UNEXPECTED;
     *buffer = NULL;
-- 
cgit v1.2.1