Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
testing:hw
:
motorola
:
addison
>
gst-omx
> _service:tar_git:0004-Fix-error-when-h264-stream-resolution-change.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0004-Fix-error-when-h264-stream-resolution-change.patch of Package gst-omx
From 718dafaca11a8d2c7c54b1f7a9d9c7baf17b6e52 Mon Sep 17 00:00:00 2001 From: Andrew den Exter <andrew.den.exter@jollamobile.com> Date: Thu, 24 Apr 2014 16:55:13 +1000 Subject: [PATCH 04/14] Fix error when h264 stream resolution changes. Contributes to JB#17654 The decoder is able to determine new configuration from the bytestream so allow it to decide when to reconfigure the output port instead of prematurely forcing an update which causes the decoder to throw an error. --- omx/gstomx.c | 2 ++ omx/gstomx.h | 4 ++++ omx/gstomxvideodec.c | 16 +++++++++------- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index df9388b..a6a054f 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -2575,6 +2575,8 @@ gst_omx_parse_hacks (gchar ** hacks) hacks_flags |= GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER; else if (g_str_equal (*hacks, "hybris")) hacks_flags |= GST_OMX_HACK_HYBRIS; + else if (g_str_equal (*hacks, "implicit-format-change")) + hacks_flags |= GST_OMX_HACK_IMPLICIT_FORMAT_CHANGE; else if (g_str_equal (*hacks, "syncframe-flag-not-used")) hacks_flags |= GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED; else if (g_str_equal (*hacks, "no-component-reconfigure")) diff --git a/omx/gstomx.h b/omx/gstomx.h index b5ad412..b9659f6 100644 --- a/omx/gstomx.h +++ b/omx/gstomx.h @@ -139,6 +139,10 @@ G_BEGIN_DECLS */ #define GST_OMX_HACK_HYBRIS G_GUINT64_CONSTANT (0x0000000000000200) +/* The component can detect format changes in the bit stream and will + * update the output port settings without the input being reconfigured. + */ +#define GST_OMX_HACK_IMPLICIT_FORMAT_CHANGE G_GUINT64_CONSTANT (0x0000000000000400) typedef struct _GstOMXCore GstOMXCore; typedef struct _GstOMXPort GstOMXPort; diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 79b4daa..a7646e3 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -1841,13 +1841,15 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder, /* Check if the caps change is a real format change or if only irrelevant * parts of the caps have changed or nothing at all. */ - is_format_change |= port_def.format.video.nFrameWidth != info->width; - is_format_change |= port_def.format.video.nFrameHeight != info->height; - is_format_change |= (port_def.format.video.xFramerate == 0 - && info->fps_n != 0) - || (port_def.format.video.xFramerate != - (info->fps_n << 16) / (info->fps_d)); - is_format_change |= (self->codec_data != state->codec_data); + if (!(klass->cdata.hacks & GST_OMX_HACK_IMPLICIT_FORMAT_CHANGE)) { + is_format_change |= port_def.format.video.nFrameWidth != info->width; + is_format_change |= port_def.format.video.nFrameHeight != info->height; + is_format_change |= (port_def.format.video.xFramerate == 0 + && info->fps_n != 0) + || (port_def.format.video.xFramerate != + (info->fps_n << 16) / (info->fps_d)); + is_format_change |= (self->codec_data != state->codec_data); + } if (klass->is_format_change) is_format_change |= klass->is_format_change (self, self->dec_in_port, state); -- 2.14.1