downloadbuffer: init upstream_size to -1

Code in check_upstream_size() is checking for -1 to check if
upstream_size has been set or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128>
This commit is contained in:
Guillaume Desmottes 2024-07-03 09:13:27 +02:00 committed by GStreamer Marge Bot
parent 523adcfb1d
commit 560d9b5b91

View file

@ -1769,7 +1769,7 @@ gst_download_buffer_src_activate_pull (GstPad * pad, GstObject * parent,
dlbuf->srcresult = GST_FLOW_OK; dlbuf->srcresult = GST_FLOW_OK;
dlbuf->sinkresult = GST_FLOW_OK; dlbuf->sinkresult = GST_FLOW_OK;
dlbuf->unexpected = FALSE; dlbuf->unexpected = FALSE;
dlbuf->upstream_size = 0; dlbuf->upstream_size = -1;
GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf);
} else { } else {
GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf);