ext/dv/gstdvdec.c (gst_dvdec_decode_video): Set the proper framerate on the outbound buffer.

Original commit message from CVS:
2005-07-19  Andy Wingo  <wingo@pobox.com>

* ext/dv/gstdvdec.c (gst_dvdec_decode_video): Set the proper
framerate on the outbound buffer.
This commit is contained in:
Andy Wingo 2005-07-19 16:08:18 +00:00
parent ee992ce60d
commit 14a7cbe19e
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2005-07-19 Andy Wingo <wingo@pobox.com>
* ext/dv/gstdvdec.c (gst_dvdec_decode_video): Set the proper
framerate on the outbound buffer.
* ext/dv/gstdvdec.c (gst_dvdec_decode_video): Don't clobber
alloc_buffer's return value.
(gst_dvdec_decode_frame): Handle unlinked pads with grace and

View file

@ -1108,6 +1108,7 @@ gst_dvdec_decode_video (GstDVDec * dvdec, const guint8 * data)
if ((dvdec->framerate != framerate) || (dvdec->height != height)
|| dvdec->wide != wide) {
GstCaps *caps;
gboolean setcaps_ret;
gint par_x, par_y;
dvdec->framerate = framerate;
@ -1138,10 +1139,11 @@ gst_dvdec_decode_video (GstDVDec * dvdec, const guint8 * data)
"format", GST_TYPE_FOURCC, GST_STR_FOURCC ("YUY2"),
"width", G_TYPE_INT, 720,
"height", G_TYPE_INT, height,
"framerate", G_TYPE_DOUBLE, framerate,
"framerate", G_TYPE_DOUBLE, framerate / dvdec->drop_factor,
"pixel-aspect-ratio", GST_TYPE_FRACTION, par_x, par_y, NULL);
gst_pad_set_caps (dvdec->videosrcpad, caps);
setcaps_ret = gst_pad_set_caps (dvdec->videosrcpad, caps);
gst_caps_unref (caps);
g_return_val_if_fail (setcaps_ret == TRUE, GST_FLOW_UNEXPECTED);
}