[Bug 734424] videorate produces bogus output when framerate=0/1

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Dec 14 04:30:11 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=734424
  GStreamer | gst-plugins-base | 1.4.0

--- Comment #19 from Thibault Saunier <tsaunier at gnome.org> 2014-12-14 12:30:08 UTC ---
Review of attachment 292612:
 --> (https://bugzilla.gnome.org/review?bug=734424&attachment=292612)

::: gst/videorate/gstvideorate.c
@@ +932,3 @@
+
+  g_object_get (GST_BASE_TRANSFORM_SRC_PAD (videorate), "caps", &srcpadcaps,
+      NULL);

DONE

@@ +933,3 @@
+  g_object_get (GST_BASE_TRANSFORM_SRC_PAD (videorate), "caps", &srcpadcaps,
+      NULL);
+  gst_video_guess_framerate (GST_BUFFER_PTS (buffer), &fps_n, &fps_d);

Basically I take the timestamp of the second buffer to compute the framerate
should be buffer->pts - prev->ts actually here (DONE), and indeed I do not know
if it will be the average and I make the assumption that timestamps from
upstream are correct.

@@ +941,3 @@
+  pad = gst_pad_get_peer (GST_BASE_TRANSFORM_SRC_PAD (videorate));
+  if (pad == NULL)
+    pad = gst_object_ref (GST_BASE_TRANSFORM_SRC_PAD (videorate));

Indeed, DONE

@@ +958,3 @@
+
+  gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (videorate),
+      gst_event_new_caps (tmpcaps));

And What do I do with the current buffers? IIUC that implies I need to wait for
the next buffer to be chained.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list