summaryrefslogtreecommitdiffstats
path: root/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0006-omxvideodec-set-OMX-buffer-flags-if-GST_BUFFER_FLAG_.patch
blob: 297ec78390233f7dbf1e1ea493c61a39da06e550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 8c999df451f8e4307b71d83177f904d1c2ebd346 Mon Sep 17 00:00:00 2001
From: Kazunori Kobayashi <kkobayas@igel.co.jp>
Date: Fri, 7 Jun 2013 15:59:21 +0900
Subject: [PATCH 06/14] omxvideodec: set OMX buffer flags if
 GST_BUFFER_FLAG_HEADER is detected

OMX for R-CarM1A requires that the OMX_BUFFERFLAG_CODECCONFIG flag
be set if the Nal unit type is SPS or PPS.
---
 omx/gstomxvideodec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 62ee5c5..1bdac85 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -2383,6 +2383,9 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
     if (offset == size)
       buf->omx_buf->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME;
 
+    if (GST_BUFFER_FLAG_IS_SET (frame->input_buffer, GST_BUFFER_FLAG_HEADER))
+      buf->omx_buf->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
+
     self->started = TRUE;
     err = gst_omx_port_release_buffer (port, buf);
     if (err != OMX_ErrorNone)
-- 
1.8.1.2