ext/dv/gstdvdec.c (gst_dvdec_decode_video): Set the proper framerate on the outbound...
authorAndy Wingo <wingo@pobox.com>
Tue, 19 Jul 2005 16:08:18 +0000 (16:08 +0000)
committerAndy Wingo <wingo@pobox.com>
Tue, 19 Jul 2005 16:08:18 +0000 (16:08 +0000)
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.

ChangeLog
ext/dv/gstdvdec.c

index 4c14f52..97e9a34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 5da1787..2f63991 100644 (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);
   }