[Spice-commits] server/gstreamer-encoder.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 27 05:29:30 UTC 2020


 server/gstreamer-encoder.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7f37f0bf8218e399d33010f356cfa2c85c50b438
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Thu Jun 25 16:45:04 2020 +0100

    gstreamer-encoder: Propagate correctly VideoEncodeResults
    
    Do not use "int" to return VideoEncodeResults result type.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index 618532a7..973a5f3f 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -1428,8 +1428,8 @@ push_raw_frame(SpiceGstEncoder *encoder,
 }
 
 /* A helper for spice_gst_encoder_encode_frame() */
-static int pull_compressed_buffer(SpiceGstEncoder *encoder,
-                                  VideoBuffer **outbuf)
+static VideoEncodeResults
+pull_compressed_buffer(SpiceGstEncoder *encoder, VideoBuffer **outbuf)
 {
     pthread_mutex_lock(&encoder->outbuf_mutex);
     while (!encoder->outbuf) {
@@ -1534,7 +1534,7 @@ spice_gst_encoder_encode_frame(VideoEncoder *video_encoder,
     }
 
     uint64_t start = spice_get_monotonic_time_ns();
-    int rc = push_raw_frame(encoder, bitmap, src, top_down, bitmap_opaque);
+    VideoEncodeResults rc = push_raw_frame(encoder, bitmap, src, top_down, bitmap_opaque);
     if (rc == VIDEO_ENCODER_FRAME_ENCODE_DONE) {
         rc = pull_compressed_buffer(encoder, outbuf);
         if (rc != VIDEO_ENCODER_FRAME_ENCODE_DONE) {


More information about the Spice-commits mailing list