[Spice-commits] 2 commits - src/channel-display-gst.c src/channel-display-mjpeg.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 28 08:09:58 UTC 2018


 src/channel-display-gst.c   |    2 ++
 src/channel-display-mjpeg.c |    1 +
 2 files changed, 3 insertions(+)

New commits:
commit 2faf4de653caa8466d79e66ffa758b5ba096a39d
Author: Uri Lublin <uril at redhat.com>
Date:   Sun May 27 17:50:41 2018 +0300

    gst_decoder_queue_frame: always free frame if it is not inserted into a queue
    
    The decoder_queue_frame function now owns 'frame'.
    If frame is not inserted into a queue (and freed later)
    it must be freed before returning.
    
    Signed-off-by: Uri Lublin <uril at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 3d0827a..c8a2ad0 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -591,6 +591,7 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
     if (decoder->pipeline == NULL) {
         /* An error occurred, causing the GStreamer pipeline to be freed */
         spice_warning("An error occurred, stopping the video stream");
+        frame->free(frame);
         return FALSE;
     }
 
@@ -598,6 +599,7 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
     if (decoder->appsrc == NULL) {
         spice_warning("Error: Playbin has not yet initialized the Appsrc element");
         stream_dropped_frame_on_playback(decoder->base.stream);
+        frame->free(frame);
         return TRUE;
     }
 #endif
commit 13d14e432d4a4ed64994784b1604f3f69d99d2d9
Author: Uri Lublin <uril at redhat.com>
Date:   Sun May 27 17:50:40 2018 +0300

    mjpeg_decoder_queue_frame: free frame when dropping the frame
    
    The frame is dropped and is not inserted into a queue to be
    freed later.
    mjpeg_decoder_queue_frame owns the frame and must free it.
    
    Signed-off-by: Uri Lublin <uril at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-display-mjpeg.c b/src/channel-display-mjpeg.c
index 8c4c0aa..7b2f775 100644
--- a/src/channel-display-mjpeg.c
+++ b/src/channel-display-mjpeg.c
@@ -262,6 +262,7 @@ static gboolean mjpeg_decoder_queue_frame(VideoDecoder *video_decoder,
      * So drop late frames as early as possible to save on processing time.
      */
     if (latency < 0) {
+        frame->free(frame);
         return TRUE;
     }
 


More information about the Spice-commits mailing list