[totem] bacon-video-widget: fix screenshotting of interlaced video



commit b427beeab1d41154b4243d51b500839db543deea
Author: Tim-Philipp Müller <tim centricular net>
Date:   Mon Feb 28 15:17:35 2011 +0000

    bacon-video-widget: fix screenshotting of interlaced video
    
    Don't specify the framerate in the output caps of the screenshot
    conversion pipeline. If there's a deinterlacer in the pipeline, the
    input framerate won't necessarily be the samem as the output
    framerate.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640933

 src/backend/bacon-video-widget-gst-0.10.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 1a9d791..e255597 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -6427,7 +6427,10 @@ bacon_video_widget_get_current_frame (BaconVideoWidget * bvw)
       "depth", G_TYPE_INT, 24,
       /* Note: we don't ask for a specific width/height here, so that
        * videoscale can adjust dimensions from a non-1/1 pixel aspect
-       * ratio to a 1/1 pixel-aspect-ratio */
+       * ratio to a 1/1 pixel-aspect-ratio. We also don't ask for a
+       * specific framerate, because the input framerate won't
+       * necessarily match the output framerate if there's a deinterlacer
+       * in the pipeline. */
       "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
       "endianness", G_TYPE_INT, G_BIG_ENDIAN,
       "red_mask", G_TYPE_INT, 0xff0000,
@@ -6435,11 +6438,6 @@ bacon_video_widget_get_current_frame (BaconVideoWidget * bvw)
       "blue_mask", G_TYPE_INT, 0x0000ff,
       NULL);
 
-  if (bvw->priv->video_fps_n > 0 && bvw->priv->video_fps_d > 0) {
-    gst_caps_set_simple (to_caps, "framerate", GST_TYPE_FRACTION, 
-      bvw->priv->video_fps_n, bvw->priv->video_fps_d, NULL);
-  }
-
   GST_DEBUG ("frame caps: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (buf));
   GST_DEBUG ("pixbuf caps: %" GST_PTR_FORMAT, to_caps);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]