From: Sebastian Dröge Date: Mon, 19 May 2014 07:06:42 +0000 (+0200) Subject: omxvideodec: Check return value of gst_buffer_map() X-Git-Tag: 1.2.0~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2e5dca5f07a32b1910b932bed793a23bd355886;p=platform%2Fupstream%2Fgst-omx.git omxvideodec: Check return value of gst_buffer_map() CID 1214599 --- diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 2536d82..079f0a9 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -432,7 +432,11 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, if (gst_buffer_get_size (outbuf) == inbuf->omx_buf->nFilledLen) { GstMapInfo map = GST_MAP_INFO_INIT; - gst_buffer_map (outbuf, &map, GST_MAP_WRITE); + if (!gst_buffer_map (outbuf, &map, GST_MAP_WRITE)) { + GST_ERROR_OBJECT (self, "Failed to map output buffer"); + goto done; + } + memcpy (map.data, inbuf->omx_buf->pBuffer + inbuf->omx_buf->nOffset, inbuf->omx_buf->nFilledLen);