mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 02:46:33 +00:00
omxvideoenc: Only drain the component a single time and only after processing started
This commit is contained in:
parent
fa6881c1cc
commit
3a17d11109
1 changed files with 8 additions and 1 deletions
|
@ -977,7 +977,11 @@ gst_omx_video_enc_set_format (GstBaseVideoEncoder * encoder,
|
||||||
* format change happened we can just exit here.
|
* format change happened we can just exit here.
|
||||||
*/
|
*/
|
||||||
if (needs_disable) {
|
if (needs_disable) {
|
||||||
|
if (self->started) {
|
||||||
gst_omx_video_enc_drain (self);
|
gst_omx_video_enc_drain (self);
|
||||||
|
self->started = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (gst_omx_port_manual_reconfigure (self->in_port, TRUE) != OMX_ErrorNone)
|
if (gst_omx_port_manual_reconfigure (self->in_port, TRUE) != OMX_ErrorNone)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (gst_omx_port_set_enabled (self->in_port, FALSE) != OMX_ErrorNone)
|
if (gst_omx_port_set_enabled (self->in_port, FALSE) != OMX_ErrorNone)
|
||||||
|
@ -1088,6 +1092,7 @@ gst_omx_video_enc_reset (GstBaseVideoEncoder * encoder)
|
||||||
|
|
||||||
if (self->started) {
|
if (self->started) {
|
||||||
gst_omx_video_enc_drain (self);
|
gst_omx_video_enc_drain (self);
|
||||||
|
self->started = FALSE;
|
||||||
|
|
||||||
gst_omx_port_set_flushing (self->in_port, TRUE);
|
gst_omx_port_set_flushing (self->in_port, TRUE);
|
||||||
gst_omx_port_set_flushing (self->out_port, TRUE);
|
gst_omx_port_set_flushing (self->out_port, TRUE);
|
||||||
|
@ -1451,6 +1456,8 @@ gst_omx_video_enc_drain (GstOMXVideoEnc * self)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Draining component");
|
GST_DEBUG_OBJECT (self, "Draining component");
|
||||||
|
|
||||||
|
g_assert (self->started);
|
||||||
|
|
||||||
/* Send an EOS buffer to the component and let the base
|
/* Send an EOS buffer to the component and let the base
|
||||||
* class drop the EOS event. We will send it later when
|
* class drop the EOS event. We will send it later when
|
||||||
* the EOS buffer arrives on the output port. */
|
* the EOS buffer arrives on the output port. */
|
||||||
|
|
Loading…
Reference in a new issue