summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos Kintschner <marcos.ktn@gmail.com>2019-04-30 21:25:12 -0300
committerTim-Philipp Müller <tim@centricular.com>2019-05-02 11:06:47 +0100
commitf13f3872a9e21302ba7c8549e4a0a04b2ad8d733 (patch)
tree3a22c121d93429ed75297f9330f1e87530d92b9e
parentd9f112ba63767215086aedba3774feec7c146bf3 (diff)
downloadgstreamer-plugins-bad-f13f3872a9e21302ba7c8549e4a0a04b2ad8d733.tar.gz
Fixed segtotal value being always 2 due to an unused variable
The 'MAX' expression used to set segtotal always returned 2 because the unused and unitialized variable buffer_frame_count was always 0
-rw-r--r--sys/wasapi/gstwasapisrc.c2
-rw-r--r--sys/wasapi/gstwasapisrc.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/wasapi/gstwasapisrc.c b/sys/wasapi/gstwasapisrc.c
index 71de12cd2..13f7113a7 100644
--- a/sys/wasapi/gstwasapisrc.c
+++ b/sys/wasapi/gstwasapisrc.c
@@ -457,7 +457,7 @@ gst_wasapi_src_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
spec->segsize = devicep_frames * bpf;
/* We need a minimum of 2 segments to ensure glitch-free playback */
- spec->segtotal = MAX (self->buffer_frame_count * bpf / spec->segsize, 2);
+ spec->segtotal = MAX (buffer_frames * bpf / spec->segsize, 2);
GST_INFO_OBJECT (self, "segsize is %i, segtotal is %i", spec->segsize,
spec->segtotal);
diff --git a/sys/wasapi/gstwasapisrc.h b/sys/wasapi/gstwasapisrc.h
index 6ba82b815..60bfc3b82 100644
--- a/sys/wasapi/gstwasapisrc.h
+++ b/sys/wasapi/gstwasapisrc.h
@@ -49,8 +49,6 @@ struct _GstWasapiSrc
/* Client was reset, so it needs to be started again */
gboolean client_needs_restart;
- /* Actual size of the allocated buffer */
- guint buffer_frame_count;
/* The mix format that wasapi prefers in shared mode */
WAVEFORMATEX *mix_format;
/* The probed caps that we can accept */