From c93cde0a3052343708769aed9ddb3051cfafde27 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 15 Mar 2012 00:25:50 +0100 Subject: [PATCH] filesrc: only update buffer size on short read --- plugins/elements/gstfilesrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 0cc684f..12575b9 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -369,7 +369,8 @@ gst_file_src_fill (GstBaseSrc * basesrc, guint64 offset, guint length, } gst_buffer_unmap (buf, &info); - gst_buffer_resize (buf, 0, bytes_read); + if (bytes_read != length) + gst_buffer_resize (buf, 0, bytes_read); GST_BUFFER_OFFSET (buf) = offset; GST_BUFFER_OFFSET_END (buf) = offset + bytes_read; -- 2.7.4