cdgdec: reset the interpreter when stopping

Fully reset the interpreter state as if we decode later it will be
another file.
This commit is contained in:
Guillaume Desmottes 2020-01-10 10:49:30 +05:30
parent 119afdde2a
commit ce004a5bac

View file

@ -99,6 +99,14 @@ impl VideoDecoderImpl for CdgDec {
self.parent_start(element)
}
fn stop(&self, element: &gst_video::VideoDecoder) -> Result<(), gst::ErrorMessage> {
{
let mut cdg_inter = self.cdg_inter.lock().unwrap();
cdg_inter.reset(true);
}
self.parent_stop(element)
}
fn handle_frame(
&self,
element: &gst_video::VideoDecoder,