summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@collabora.co.uk>2014-01-29 18:29:21 (GMT)
committerMarco Barisione <marco.barisione@collabora.co.uk>2014-03-06 09:42:27 (GMT)
commit728a3269439fdc2dd8faaba75cbf4bac1b252f8b (patch)
treece692f2b91f9dd014d098270dd2fb0ff3f6e3161
parentc8a6a89ba3b445b5a8bf40d94c2fb4ffe60711c7 (diff)
downloadgst-omx-728a3269439fdc2dd8faaba75cbf4bac1b252f8b.tar.gz
gst-omx-728a3269439fdc2dd8faaba75cbf4bac1b252f8b.tar.xz
omxvideodec: catch error when calling gst_omx_port_populate in reset
-rw-r--r--omx/gstomxvideodec.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index f0b27ce..27850d2 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1839,8 +1839,8 @@ do_resize_done:
#if defined (USE_OMX_TARGET_RPI)
bufsize =
- self->use_resizer ? self->res_out_port->port_def.nBufferSize : self->
- dec_out_port->port_def.nBufferSize;
+ self->use_resizer ? self->res_out_port->port_def.
+ nBufferSize : self->dec_out_port->port_def.nBufferSize;
#else
bufsize = self->dec_out_port->port_def.nBufferSize;
#endif
@@ -3494,6 +3494,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);
@@ -3536,17 +3537,22 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard)
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);
- gst_omx_port_populate (self->egl_out_port);
+ err = gst_omx_port_populate (self->egl_out_port);
} else
#endif
if (self->use_resizer) {
gst_omx_port_set_flushing (self->res_in_port, 5 * GST_SECOND, FALSE);
gst_omx_port_set_flushing (self->res_out_port, 5 * GST_SECOND, FALSE);
- gst_omx_port_populate (self->res_out_port);
+ err = gst_omx_port_populate (self->res_out_port);
} else
#endif
/* else */
- gst_omx_port_populate (self->dec_out_port);
+ err = gst_omx_port_populate (self->dec_out_port);
+
+ 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;