summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97518bc)
raw | patch | inline | side by side (parent: 97518bc)
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 22 Mar 2012 14:31:59 +0000 (15:31 +0100) | ||
committer | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Thu, 22 Mar 2012 14:31:59 +0000 (15:31 +0100) |
src/gstducatividdec.c | patch | blob | history | |
src/gstducatividdec.h | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 0ba4af36d61ee32bd34355932f719c576b32dc8e..0ea500570e16104fc176646a55dd75bbbbd070f2 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
GstStructure *s;
GstCaps *outcaps = NULL;
GstStructure *out_s;
- gint frn = 0, frd = 1;
gint par_width, par_height;
gboolean par_present;
/* update output/padded sizes */
klass->update_buffer_size (self);
- gst_structure_get_fraction (s, "framerate", &frn, &frd);
+ if (!gst_structure_get_fraction (s, "framerate", &self->fps_n, &self->fps_d)) {
+ self->fps_n = 0;
+ self->fps_d = 1;
+ }
gst_structure_get_boolean (s, "interlaced", &self->interlaced);
par_present = gst_structure_get_fraction (s, "pixel-aspect-ratio",
&par_width, &par_height);
gst_structure_set (out_s,
"width", G_TYPE_INT, self->padded_width,
"height", G_TYPE_INT, self->padded_height,
- "framerate", GST_TYPE_FRACTION, frn, frd, NULL);
+ "framerate", GST_TYPE_FRACTION, self->fps_n, self->fps_d, NULL);
if (par_present)
gst_structure_set (out_s, "pixel-aspect-ratio", GST_TYPE_FRACTION,
par_width, par_height, NULL);
ret = gst_pad_set_caps (self->srcpad, outcaps);
+ GST_INFO_OBJECT (self, "set caps done %d, %"GST_PTR_FORMAT,
+ ret, outcaps);
+
out:
if (outcaps)
gst_caps_unref (outcaps);
*/
self->width = 128;
self->height = 128;
+ self->fps_n = -1;
+ self->fps_d = -1;
self->first_in_buffer = TRUE;
self->first_out_buffer = TRUE;
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index 0b7297327a97b6aae9fc56794074d4398f8c827f..d744c5f0e17e904cea84233f15160de52e9253cd 100644 (file)
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
/* input (unpadded, aligned to MB) size of video: */
gint width, height;
+ gint fps_n, fps_d;
+
/* output (padded) size including any codec padding: */
gint padded_width, padded_height;