videoencoder: Reset internal state and segments on FLUSH_STOP

https://bugzilla.gnome.org/show_bug.cgi?id=656007
This commit is contained in:
Sebastian Dröge 2013-07-25 10:46:04 +02:00
parent 7074fff7b4
commit 291b05b40a

View file

@ -1018,6 +1018,14 @@ gst_video_encoder_sink_event_default (GstVideoEncoder * encoder,
}
break;
}
case GST_EVENT_FLUSH_STOP:{
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
gst_segment_init (&encoder->input_segment, GST_FORMAT_TIME);
gst_segment_init (&encoder->output_segment, GST_FORMAT_TIME);
gst_video_encoder_reset (encoder, FALSE);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
break;
}
default:
break;
}