omxvideoenc: Drop EOS events in ::finish()

The event will be forwarded downstream from the srcpad
loop function after the last buffer was generated by the
component. Forwarding it after ::finish() will use the
sinkpad streaming thread and does not guarantee that
the encoder is completely drained.
This commit is contained in:
Sebastian Dröge 2011-12-05 08:12:48 +01:00
parent b4e632cefe
commit 781e61d569

View file

@ -1505,7 +1505,7 @@ buffer_fill_error:
} }
} }
static gboolean static GstFlowReturn
gst_omx_video_enc_finish (GstBaseVideoEncoder * encoder) gst_omx_video_enc_finish (GstBaseVideoEncoder * encoder)
{ {
GstOMXVideoEnc *self; GstOMXVideoEnc *self;
@ -1519,7 +1519,7 @@ gst_omx_video_enc_finish (GstBaseVideoEncoder * encoder)
/* Don't send EOS buffer twice, this doesn't work */ /* Don't send EOS buffer twice, this doesn't work */
if (self->eos) { if (self->eos) {
GST_DEBUG_OBJECT (self, "Component is already EOS"); GST_DEBUG_OBJECT (self, "Component is already EOS");
return TRUE; return GST_BASE_VIDEO_ENCODER_FLOW_DROPPED;
} }
self->eos = TRUE; self->eos = TRUE;
@ -1542,7 +1542,7 @@ gst_omx_video_enc_finish (GstBaseVideoEncoder * encoder)
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self); GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
return TRUE; return GST_BASE_VIDEO_ENCODER_FLOW_DROPPED;
} }
static GstFlowReturn static GstFlowReturn