From: Sebastian Dröge Date: Wed, 13 Jul 2011 10:37:44 +0000 (+0200) Subject: omxvideodec: Free all pending frames when resetting the decoder X-Git-Tag: 1.0.0~432 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5690ff412c5e4969fc64a1e339c3a4e5e9d0dbc;p=platform%2Fupstream%2Fgst-omx.git omxvideodec: Free all pending frames when resetting the decoder Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=654529 --- 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);