audioencoder: flush encoder in transition PAUSED->READY

https://bugzilla.gnome.org/show_bug.cgi?id=787311
This commit is contained in:
Nicola Murino 2017-09-27 16:32:13 +02:00 committed by Matthew Waters
parent e7cf4c058d
commit 2dcdd13512

View file

@ -530,6 +530,14 @@ gst_audio_encoder_change_state (GstElement * element, GstStateChange transition)
if (!klass->open (enc))
goto open_failed;
}
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (klass->flush) {
GST_AUDIO_ENCODER_STREAM_LOCK (enc);
klass->flush (enc);
GST_AUDIO_ENCODER_STREAM_UNLOCK (enc);
}
break;
default:
break;
}