mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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.
This commit is contained in:
parent
044dd6626f
commit
587973e783
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-11-26 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* 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>
|
2005-11-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* docs/plugins/Makefile.am:
|
* docs/plugins/Makefile.am:
|
||||||
|
|
|
@ -203,7 +203,8 @@ gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
GstDVDec *dvdec;
|
GstDVDec *dvdec;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
GstCaps *othercaps;
|
GstCaps *othercaps;
|
||||||
const GValue *par, *rate;
|
gboolean gotpar = FALSE;
|
||||||
|
const GValue *par = NULL, *rate = NULL;
|
||||||
|
|
||||||
dvdec = GST_DVDEC (gst_pad_get_parent (pad));
|
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))
|
if (!gst_structure_get_int (s, "height", &dvdec->height))
|
||||||
goto error;
|
goto error;
|
||||||
if (!(par = gst_structure_get_value (s, "pixel-aspect-ratio")))
|
if ((par = gst_structure_get_value (s, "pixel-aspect-ratio")))
|
||||||
goto error;
|
gotpar = TRUE;
|
||||||
if (!(rate = gst_structure_get_value (s, "framerate")))
|
if (!(rate = gst_structure_get_value (s, "framerate")))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -230,8 +231,9 @@ gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
"height", G_TYPE_INT, dvdec->height,
|
"height", G_TYPE_INT, dvdec->height,
|
||||||
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
|
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
|
||||||
dvdec->framerate_denominator, NULL);
|
dvdec->framerate_denominator, NULL);
|
||||||
gst_structure_set_value (gst_caps_get_structure (othercaps, 0),
|
if (gotpar)
|
||||||
"pixel-aspect-ratio", par);
|
gst_structure_set_value (gst_caps_get_structure (othercaps, 0),
|
||||||
|
"pixel-aspect-ratio", par);
|
||||||
|
|
||||||
gst_pad_set_caps (dvdec->srcpad, othercaps);
|
gst_pad_set_caps (dvdec->srcpad, othercaps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue