From a80ca97ec35c963fcef7c1793d3727ced7a3c032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 7 Nov 2011 10:58:44 +0100 Subject: [PATCH] omxvideoenc: Free all pending frames after draining the component --- omx/gstomxvideoenc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 8bf7ce842b..61eaf9341a 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -982,6 +982,16 @@ gst_omx_video_enc_set_format (GstBaseVideoEncoder * encoder, self->started = FALSE; } + /* FIXME: Workaround for + * https://bugzilla.gnome.org/show_bug.cgi?id=654529 + * + * This is always called with GST_BASE_VIDEO_CODEC_STREAM_LOCK + */ + g_list_foreach (GST_BASE_VIDEO_CODEC (self)->frames, + (GFunc) gst_base_video_codec_free_frame, NULL); + g_list_free (GST_BASE_VIDEO_CODEC (self)->frames); + GST_BASE_VIDEO_CODEC (self)->frames = NULL; + if (gst_omx_port_manual_reconfigure (self->in_port, TRUE) != OMX_ErrorNone) return FALSE; if (gst_omx_port_set_enabled (self->in_port, FALSE) != OMX_ErrorNone)