From 32e88fd0632619c5d3eb95a58a0cceb6f5f6d0d0 Mon Sep 17 00:00:00 2001 From: Yuqing Zhu Date: Mon, 10 Aug 2015 11:41:37 +0800 Subject: gstreamer1.0-plugins-base: Keep sticky events around when doing a soft reset The current code will first discard all frames, and then tries to copy all sticky events from the (now discarded) frames. So change the order. Signed-off-by: Yuqing Zhu Signed-off-by: Ross Burton --- ...p-sticky-events-around-when-doing-a-soft-.patch | 46 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch (limited to 'meta') diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch new file mode 100644 index 0000000000..b476969111 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch @@ -0,0 +1,46 @@ +From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001 +From: Song Bing +Date: Fri, 27 Mar 2015 13:39:43 +0800 +Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft + reset + +The current code will first discard all frames, and then tries to copy +all sticky events from the (now discarded) frames. Let's change the order. + +https://bugzilla.gnome.org/show_bug.cgi?id=746865 + +Upstream-Status: Accepted + +--- + gst-libs/gst/video/gstvideoencoder.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c +index 614ba2d..4c5b111 100644 +--- a/gst-libs/gst/video/gstvideoencoder.c ++++ b/gst-libs/gst/video/gstvideoencoder.c +@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard) + + priv->drained = TRUE; + +- g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL); +- g_list_free (priv->frames); +- priv->frames = NULL; +- + priv->bytes = 0; + priv->time = 0; + +@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard) + encoder->priv->current_frame_events); + } + ++ g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL); ++ g_list_free (priv->frames); ++ priv->frames = NULL; ++ + GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder); + + return ret; +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb index 9c31391587..8daf5af709 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb @@ -14,6 +14,7 @@ SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \ file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \ file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch \ file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \ + file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \ " SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e" -- cgit 1.2.3-korg