mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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
This commit is contained in:
parent
3a0a82a783
commit
dd7839ca43
2 changed files with 1 additions and 3 deletions
|
@ -473,7 +473,7 @@ gst_wasapi_src_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
|
||||||
spec->segsize = devicep_frames * bpf;
|
spec->segsize = devicep_frames * bpf;
|
||||||
|
|
||||||
/* We need a minimum of 2 segments to ensure glitch-free playback */
|
/* 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,
|
GST_INFO_OBJECT (self, "segsize is %i, segtotal is %i", spec->segsize,
|
||||||
spec->segtotal);
|
spec->segtotal);
|
||||||
|
|
|
@ -49,8 +49,6 @@ struct _GstWasapiSrc
|
||||||
/* Client was reset, so it needs to be started again */
|
/* Client was reset, so it needs to be started again */
|
||||||
gboolean client_needs_restart;
|
gboolean client_needs_restart;
|
||||||
|
|
||||||
/* Actual size of the allocated buffer */
|
|
||||||
guint buffer_frame_count;
|
|
||||||
/* The mix format that wasapi prefers in shared mode */
|
/* The mix format that wasapi prefers in shared mode */
|
||||||
WAVEFORMATEX *mix_format;
|
WAVEFORMATEX *mix_format;
|
||||||
/* The probed caps that we can accept */
|
/* The probed caps that we can accept */
|
||||||
|
|
Loading…
Reference in a new issue