vtdec: flush decoder on stop

fix a memory leak if the decoder shut down before EOS

https://bugzilla.gnome.org/show_bug.cgi?id=787311
This commit is contained in:
Nicola Murino 2017-10-23 10:42:51 +02:00 committed by Matthew Waters
parent 889e735675
commit 6165e07b62

View file

@ -187,6 +187,8 @@ gst_vtdec_stop (GstVideoDecoder * decoder)
{
GstVtdec *vtdec = GST_VTDEC (decoder);
gst_vtdec_push_frames_if_needed (vtdec, TRUE, TRUE);
if (vtdec->input_state)
gst_video_codec_state_unref (vtdec->input_state);
vtdec->input_state = NULL;