From 0c72a15019dd087a3e8b72e8f532c5050ceeff47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Jul 2011 12:59:07 +0200 Subject: [PATCH] basevideodecoder: First inform subclass about resetting before resetting/freeing all internal state The subclass might want to access the old state. --- omx/gstbasevideodecoder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/omx/gstbasevideodecoder.c b/omx/gstbasevideodecoder.c index f2b2a68ee5..0278abc83e 100644 --- a/omx/gstbasevideodecoder.c +++ b/omx/gstbasevideodecoder.c @@ -359,6 +359,11 @@ gst_base_video_decoder_flush (GstBaseVideoDecoder * dec, gboolean hard) GST_LOG_OBJECT (dec, "flush hard %d", hard); + /* Inform subclass */ + /* FIXME ? only if hard, or tell it if hard ? */ + if (klass->reset) + klass->reset (dec); + /* FIXME make some more distinction between hard and soft, * but subclass may not be prepared for that */ /* FIXME perhaps also clear pending frames ?, @@ -377,11 +382,6 @@ gst_base_video_decoder_flush (GstBaseVideoDecoder * dec, gboolean hard) /* and get (re)set for the sequel */ gst_base_video_decoder_reset (dec, FALSE); - /* also inform subclass */ - /* FIXME ? only if hard, or tell it if hard ? */ - if (klass->reset) - klass->reset (dec); - return ret; }