diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-07-11 12:59:07 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-07-11 12:59:07 +0200 |
commit | 83c4e8814e77b780fee20aa65b673623ac5a3e66 (patch) | |
tree | b2f83855dc00b97847cfb4c2e9bdbb3f6e94aa38 /gst-libs/gst/video/gstbasevideodecoder.c | |
parent | a59246c1d198fc378bef477fd4f39477b93b520d (diff) | |
download | gstreamer-plugins-bad-83c4e8814e77b780fee20aa65b673623ac5a3e66.tar.gz |
basevideodecoder: First inform subclass about resetting before resetting/freeing all internal state
The subclass might want to access the old state.
Diffstat (limited to 'gst-libs/gst/video/gstbasevideodecoder.c')
-rw-r--r-- | gst-libs/gst/video/gstbasevideodecoder.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c index f2b2a68ee..0278abc83 100644 --- a/gst-libs/gst/video/gstbasevideodecoder.c +++ b/gst-libs/gst/video/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; } |