mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
wavparse: do not rely on call failure keeping return data unmodified
This is clearer this way too. Coverity 206029
This commit is contained in:
parent
b344b29ff2
commit
7ebfdbeaf8
1 changed files with 4 additions and 3 deletions
|
@ -1601,9 +1601,10 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
* that is, buffers not too small either size or time wise
|
||||
* so we do not end up with too many of them */
|
||||
/* var abuse */
|
||||
upstream_size = 0;
|
||||
gst_wavparse_time_to_bytepos (wav, 40 * GST_MSECOND, &upstream_size);
|
||||
wav->max_buf_size = upstream_size;
|
||||
if (gst_wavparse_time_to_bytepos (wav, 40 * GST_MSECOND, &upstream_size))
|
||||
wav->max_buf_size = upstream_size;
|
||||
else
|
||||
wav->max_buf_size = 0;
|
||||
wav->max_buf_size = MAX (wav->max_buf_size, MAX_BUFFER_SIZE);
|
||||
if (wav->blockalign > 0)
|
||||
wav->max_buf_size -= (wav->max_buf_size % wav->blockalign);
|
||||
|
|
Loading…
Reference in a new issue