From: <bi...@fr...> - 2005-11-26 12:55:00
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: bilboed Date: Sat Nov 26 2005 04:54:59 PST Log message: * 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. Modified files: . : ChangeLog ext/dv : gstdvdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2010&r2=1.2011 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/dv/gstdvdec.c.diff?r1=1.94&r2=1.95 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2010 retrieving revision 1.2011 diff -u -d -r1.2010 -r1.2011 --- ChangeLog 25 Nov 2005 22:14:46 -0000 1.2010 +++ ChangeLog 26 Nov 2005 12:54:46 -0000 1.2011 @@ -1,3 +1,9 @@ +2005-11-26 Edward Hervey <ed...@fl...> + + * 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. 2005-11-25 Thomas Vander Stichele <thomas at apestaart dot org> * docs/plugins/Makefile.am: Index: gstdvdec.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/dv/gstdvdec.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- gstdvdec.c 22 Nov 2005 18:11:23 -0000 1.94 +++ gstdvdec.c 26 Nov 2005 12:54:47 -0000 1.95 @@ -203,7 +203,8 @@ 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 @@ 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"))) @@ -230,8 +231,9 @@ "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); |