videoencoder: remove the lock from gst_video_encoder_flush

The lock is already taken before calling the flush method and can lead to
deadlock for some encoders that need to take the same lock from another
thread while flushing

https://bugzilla.gnome.org/show_bug.cgi?id=787311
This commit is contained in:
Nicola Murino 2017-09-28 13:12:58 +02:00 committed by Matthew Waters
parent 6e9edc3031
commit 6627dd3ae3

View file

@ -418,11 +418,9 @@ gst_video_encoder_flush (GstVideoEncoder * encoder)
GstVideoEncoderClass *klass = GST_VIDEO_ENCODER_GET_CLASS (encoder);
gboolean ret = TRUE;
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
if (klass->flush)
ret = klass->flush (encoder);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
return ret;
}