diff options
author | Julien Isorce <julien.isorce@collabora.co.uk> | 2014-01-27 17:03:50 +0000 |
---|---|---|
committer | Julien Isorce <julien.isorce@collabora.co.uk> | 2014-03-25 16:06:51 +0000 |
commit | 777411c286dafd1be7024c238a8a5c851ddd3e8e (patch) | |
tree | 9d6e6e794f39148949b9e48c565301a9b548d0cc | |
parent | 100e9f998d6f986838f9e27be1ef1d511a9638e3 (diff) |
omxvideodec: populate the most downstream output port on reset
Make seeking work when using egl_render component
https://bugzilla.gnome.org/show_bug.cgi?id=726038
-rw-r--r-- | omx/gstomxvideodec.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 7660101..4db42c7 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -1944,6 +1944,7 @@ static gboolean gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard) { GstOMXVideoDec *self; + OMX_ERRORTYPE err = OMX_ErrorNone; self = GST_OMX_VIDEO_DEC (decoder); @@ -1958,8 +1959,10 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard) gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, TRUE); #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_EGL) - gst_omx_port_set_flushing (self->egl_in_port, 5 * GST_SECOND, TRUE); - gst_omx_port_set_flushing (self->egl_out_port, 5 * GST_SECOND, TRUE); + if (self->eglimage) { + gst_omx_port_set_flushing (self->egl_in_port, 5 * GST_SECOND, TRUE); + gst_omx_port_set_flushing (self->egl_out_port, 5 * GST_SECOND, TRUE); + } #endif /* Wait until the srcpad loop is finished, @@ -1972,13 +1975,24 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard) gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, FALSE); gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, FALSE); - gst_omx_port_populate (self->dec_out_port); #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_EGL) - gst_omx_port_set_flushing (self->egl_in_port, 5 * GST_SECOND, FALSE); - gst_omx_port_set_flushing (self->egl_out_port, 5 * GST_SECOND, FALSE); + if (self->eglimage) { + gst_omx_port_set_flushing (self->egl_in_port, 5 * GST_SECOND, FALSE); + gst_omx_port_set_flushing (self->egl_out_port, 5 * GST_SECOND, FALSE); + err = gst_omx_port_populate (self->egl_out_port); + } else { + err = gst_omx_port_populate (self->dec_out_port); + } +#else + err = gst_omx_port_populate (self->dec_out_port); #endif + if (err != OMX_ErrorNone) { + GST_WARNING_OBJECT (self, "Failed to populate output port: %s (0x%08x)", + gst_omx_error_to_string (err), err); + } + /* Start the srcpad loop again */ self->last_upstream_ts = 0; self->eos = FALSE; |