[Spice-devel] [spice-gtk PATCH v2 2/2] gst_decoder_queue_frame: always free frame if it is not inserted into a queue
Uri Lublin
uril at redhat.com
Sun May 27 14:50:41 UTC 2018
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>
---
changes since v1: (per Freiano's review comments)
- Subject changed (not mentioning return FALSE)
- Information added to commit log
- A second frame->free(frame) added
---
src/channel-display-gst.c | 2 ++
1 file changed, 2 insertions(+)
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
--
2.17.0
More information about the Spice-devel
mailing list