summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2009-07-22 12:34:36 +0200
committerJulien Isorce <julien.isorce@gmail.com>2009-07-22 12:34:36 +0200
commit4d926e3b0d57b70ba6cbe1351a98d77c0e34d019 (patch)
treeedb744e7c1c4fc05d23c4fdd6897de78e24ec663
parent0efde4cb7085ca1289c401090ed995a3be2f4041 (diff)
downloadgstreamer-plugins-bad-4d926e3b0d57b70ba6cbe1351a98d77c0e34d019.tar.gz
dshowaudiosrc: do not remove a range of length 0
-rwxr-xr-xsys/dshowsrcwrapper/gstdshowaudiosrc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp
index 8961c96d1..c213aae54 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);
}