Commit dd7839ca authored by Marcos Kintschner's avatar Marcos Kintschner

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
parent 3a0a82a7
Pipeline #34381 passed with stages
in 103 minutes and 31 seconds
......@@ -473,7 +473,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);
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment