diff options
author | Julien Isorce <julien.isorce@gmail.com> | 2009-07-22 12:34:36 +0200 |
---|---|---|
committer | Julien Isorce <julien.isorce@gmail.com> | 2009-07-22 12:34:36 +0200 |
commit | 4d926e3b0d57b70ba6cbe1351a98d77c0e34d019 (patch) | |
tree | edb744e7c1c4fc05d23c4fdd6897de78e24ec663 /sys | |
parent | 0efde4cb7085ca1289c401090ed995a3be2f4041 (diff) | |
download | gst-plugins-bad-4d926e3b0d57b70ba6cbe1351a98d77c0e34d019.tar.gz gst-plugins-bad-4d926e3b0d57b70ba6cbe1351a98d77c0e34d019.tar.bz2 gst-plugins-bad-4d926e3b0d57b70ba6cbe1351a98d77c0e34d019.zip |
dshowaudiosrc: do not remove a range of length 0
Diffstat (limited to 'sys')
-rwxr-xr-x | sys/dshowsrcwrapper/gstdshowaudiosrc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |