mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 14:36:41 +00:00
omxvideodec: Only drain the component a single time and only after processing started
This commit is contained in:
parent
3a17d11109
commit
d5371b9208
1 changed files with 8 additions and 1 deletions
|
@ -1054,7 +1054,11 @@ gst_omx_video_dec_set_format (GstBaseVideoDecoder * decoder,
|
|||
}
|
||||
|
||||
if (needs_disable && is_format_change) {
|
||||
gst_omx_video_dec_drain (self);
|
||||
if (self->started) {
|
||||
gst_omx_video_dec_drain (self);
|
||||
self->started = FALSE;
|
||||
}
|
||||
|
||||
if (klass->hacks & GST_OMX_HACK_NO_COMPONENT_RECONFIGURE) {
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
gst_omx_video_dec_stop (GST_BASE_VIDEO_DECODER (self));
|
||||
|
@ -1174,6 +1178,7 @@ gst_omx_video_dec_reset (GstBaseVideoDecoder * decoder)
|
|||
|
||||
if (self->started) {
|
||||
gst_omx_video_dec_drain (self);
|
||||
self->started = FALSE;
|
||||
|
||||
gst_omx_port_set_flushing (self->in_port, TRUE);
|
||||
gst_omx_port_set_flushing (self->out_port, TRUE);
|
||||
|
@ -1426,6 +1431,8 @@ gst_omx_video_dec_drain (GstOMXVideoDec * self)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Draining component");
|
||||
|
||||
g_assert (self->started);
|
||||
|
||||
/* Send an EOS buffer to the component and let the base
|
||||
* class drop the EOS event. We will send it later when
|
||||
* the EOS buffer arrives on the output port. */
|
||||
|
|
Loading…
Reference in a new issue