adaptivedemux2/downloadhelper: Remove return val for download_request_add_buffer()
authorJan Schmidt <jan@centricular.com>
Thu, 13 Oct 2022 19:21:41 +0000 (06:21 +1100)
committerJan Schmidt <jan@centricular.com>
Fri, 4 Nov 2022 16:24:27 +0000 (03:24 +1100)
The function can't actually fail, and the only caller
was ignoring the result anyway, so remove the return value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

subprojects/gst-plugins-good/ext/adaptivedemux2/downloadrequest.c
subprojects/gst-plugins-good/ext/adaptivedemux2/downloadrequest.h

index 67cbb32..a40878c 100644 (file)
@@ -367,18 +367,18 @@ download_request_get_caps (DownloadRequest * request)
   return caps;
 }
 
-gboolean
+void
 download_request_add_buffer (DownloadRequest * request, GstBuffer * buffer)
 {
   DownloadRequestPrivate *priv = DOWNLOAD_REQUEST_PRIVATE (request);
 
-  g_return_val_if_fail (request != NULL, FALSE);
-  g_return_val_if_fail (buffer != NULL, FALSE);
+  g_return_if_fail (request != NULL);
+  g_return_if_fail (buffer != NULL);
 
   if (request->state == DOWNLOAD_REQUEST_STATE_COMPLETE) {
     GST_WARNING ("Download request is completed, could not add more buffers");
     gst_buffer_unref (buffer);
-    return FALSE;
+    return;
   }
 
   GST_DEBUG ("Adding new buffer %" GST_PTR_FORMAT " to the request data",
@@ -391,6 +391,4 @@ download_request_add_buffer (DownloadRequest * request, GstBuffer * buffer)
     priv->buffer = buffer;
   else
     priv->buffer = gst_buffer_append (priv->buffer, buffer);
-
-  return TRUE;
 }
index 23b666a..b814d92 100644 (file)
@@ -83,7 +83,7 @@ void download_request_set_caps (DownloadRequest * request, GstCaps * caps);
 
 GstCaps * download_request_get_caps (DownloadRequest * request);
 
-gboolean download_request_add_buffer (DownloadRequest *request, GstBuffer *buffer);
+void download_request_add_buffer (DownloadRequest *request, GstBuffer *buffer);
 GstBuffer * download_request_take_buffer (DownloadRequest *request);
 
 DownloadRequest * download_request_new (void);