From 4d926e3b0d57b70ba6cbe1351a98d77c0e34d019 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Wed, 22 Jul 2009 12:34:36 +0200 Subject: dshowaudiosrc: do not remove a range of length 0 --- sys/dshowsrcwrapper/gstdshowaudiosrc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp index 8961c96d..c213aae5 100755 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp @@ -765,7 +765,9 @@ gst_dshowaudiosrc_reset (GstAudioSrc * asrc) GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); g_mutex_lock (src->gbarray_lock); - g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); + GST_DEBUG ("byte array size= %d", src->gbarray->len); + if (src->gbarray->len > 0) + g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); g_mutex_unlock (src->gbarray_lock); } -- cgit v1.2.1