summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2010-12-15 19:03:09 -0600
committerRob Clark <rob@ti.com>2010-12-15 21:30:25 -0600
commitbd235864a96fe9fc06df69bc9fc457d0408d9756 (patch)
treedde7ef1a6d276b8449ac70676fb8c3ff359bdc25
parent442d86e32d6ee7ad4956051c7cf0c4c56154b23a (diff)
viddec: fix for width/height that is not a multiple of 16
This fixes an issue with latest h264dec codec drop.
-rw-r--r--src/gstducatividdec.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index d388087..7719fdf 100644
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
@@ -139,8 +139,8 @@ codec_create (GstDucatiVidDec * self)
}
/* these need to be set before VIDDEC3_create */
- self->params->maxWidth = (self->width + 15) & ~0xf; /* round up to MB */
- self->params->maxHeight = (self->height + 15) & ~0xf; /* round up to MB */
+ self->params->maxWidth = self->width;
+ self->params->maxHeight = self->height;
codec_name = GST_DUCATIVIDDEC_GET_CLASS (self)->codec_name;
@@ -375,9 +375,13 @@ static gboolean
gst_ducati_viddec_parse_caps (GstDucatiVidDec * self, GstStructure * s)
{
const GValue *codec_data;
+ gint w, h;
- if (gst_structure_get_int (s, "width", &self->width) &&
- gst_structure_get_int (s, "height", &self->height)) {
+ if (gst_structure_get_int (s, "width", &w) &&
+ gst_structure_get_int (s, "height", &h)) {
+
+ self->width = ALIGN2 (w, 4); /* round up to MB */
+ self->height = ALIGN2 (h, 4); /* round up to MB */
const GValue *codec_data = gst_structure_get_value (s, "codec_data");