summaryrefslogtreecommitdiffstats
path: root/ext/dv
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2005-11-26 12:54:47 +0000
committerEdward Hervey <bilboed@bilboed.com>2005-11-26 12:54:47 +0000
commit587973e783dd543accbf511fc2afe37c420bdf3a (patch)
tree252cd48bc40d7e6155ca7a1eab0571c49d3c3caa /ext/dv
parent044dd6626f9ad21ee6d47d0a18084f8c7b5c0373 (diff)
ext/dv/gstdvdec.c: Handle the case where the incoming Video dv stream doesn't have a pixel aspect ratio set.
Original commit message from CVS: * ext/dv/gstdvdec.c: (gst_dvdec_sink_setcaps): Handle the case where the incoming Video dv stream doesn't have a pixel aspect ratio set.
Diffstat (limited to 'ext/dv')
-rw-r--r--ext/dv/gstdvdec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index c0007d17..917fa716 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -203,7 +203,8 @@ gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps)
GstDVDec *dvdec;
GstStructure *s;
GstCaps *othercaps;
- const GValue *par, *rate;
+ gboolean gotpar = FALSE;
+ const GValue *par = NULL, *rate = NULL;
dvdec = GST_DVDEC (gst_pad_get_parent (pad));
@@ -212,8 +213,8 @@ gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps)
if (!gst_structure_get_int (s, "height", &dvdec->height))
goto error;
- if (!(par = gst_structure_get_value (s, "pixel-aspect-ratio")))
- goto error;
+ if ((par = gst_structure_get_value (s, "pixel-aspect-ratio")))
+ gotpar = TRUE;
if (!(rate = gst_structure_get_value (s, "framerate")))
goto error;
@@ -230,8 +231,9 @@ gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps)
"height", G_TYPE_INT, dvdec->height,
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
dvdec->framerate_denominator, NULL);
- gst_structure_set_value (gst_caps_get_structure (othercaps, 0),
- "pixel-aspect-ratio", par);
+ if (gotpar)
+ gst_structure_set_value (gst_caps_get_structure (othercaps, 0),
+ "pixel-aspect-ratio", par);
gst_pad_set_caps (dvdec->srcpad, othercaps);