From f5690ff412c5e4969fc64a1e339c3a4e5e9d0dbc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 13 Jul 2011 12:37:44 +0200 Subject: [PATCH] omxvideodec: Free all pending frames when resetting the decoder Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=654529 --- omx/gstomxvideodec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 3aa0115..554e9b3 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -758,6 +758,16 @@ gst_omx_video_dec_reset (GstBaseVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Resetting decoder"); + /* FIXME: Workaround for + * https://bugzilla.gnome.org/show_bug.cgi?id=654529 + */ + GST_OBJECT_LOCK (self); + 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; + GST_OBJECT_UNLOCK (self); + gst_omx_port_set_flushing (self->in_port, TRUE); gst_omx_port_set_flushing (self->out_port, TRUE); -- 2.7.4