vaapipostproc: clear state on stop
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 27 Jan 2015 14:06:02 +0000 (16:06 +0200)
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>
Tue, 27 Jan 2015 14:06:02 +0000 (16:06 +0200)
Otherwise restarting may fail because the state of vaapipluginbase and
vaapipostproc don't match. e.g. gst_vaapipostproc_set_caps() will skip
initailization and not call gst_vaapi_plugin_base_set_caps()

gst/vaapi/gstvaapipostproc.c

index 2d051c8..756491b 100644 (file)
@@ -334,6 +334,12 @@ gst_vaapipostproc_stop (GstBaseTransform * trans)
   ds_reset (&postproc->deinterlace_state);
   gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (postproc));
   postproc->filter_pool_active = FALSE;
+
+  postproc->field_duration = GST_CLOCK_TIME_NONE;
+  gst_video_info_init(&postproc->sinkpad_info);
+  gst_video_info_init(&postproc->srcpad_info);
+  gst_video_info_init(&postproc->filter_pool_info);
+
   return TRUE;
 }