summaryrefslogtreecommitdiff
path: root/recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2009-07-19 16:22:23 -0400
committerPhilip Balister <philip@balister.org>2009-07-19 16:22:23 -0400
commit6568b9e34d43470336d0240fa8dbfc5122a9474e (patch)
tree72392c0a276bde79fe4991b60081738d6e843f68 /recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch
parentff4bd21194d38ee0b9f6892e3cae5ffc34504cad (diff)
parent918aa5c5a17a342eaafad143cdc0ccff059e5884 (diff)
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch')
-rw-r--r--recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch b/recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch
new file mode 100644
index 0000000000..749c4918a9
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-good/fix-unit-scale-asseration.patch
@@ -0,0 +1,33 @@
+diff -uNr gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c gst-plugins-good-0.10.15.new/sys/v4l2/gstv4l2src.c
+--- gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c 2009-05-11 19:00:07.000000000 -0500
++++ gst-plugins-good-0.10.15.new/sys/v4l2/gstv4l2src.c 2009-06-22 09:51:50.000000000 -0500
+@@ -1377,14 +1377,22 @@
+ timestamp = gst_clock_get_time (clock) - timestamp;
+ gst_object_unref (clock);
+
+- latency =
+- gst_util_uint64_scale_int (GST_SECOND, v4l2src->fps_d,
+- v4l2src->fps_n);
++ /* we must have a framerate */
++ if (v4l2src->fps_n <= 0 || v4l2src->fps_d <= 0) {
++ GST_WARNING_OBJECT (src,
++ "Can't give latency since framerate isn't fixated !");
++ timestamp = GST_CLOCK_TIME_NONE;
++ }
++ else {
++ latency =
++ gst_util_uint64_scale_int (GST_SECOND, v4l2src->fps_d,
++ v4l2src->fps_n);
+
+- if (timestamp > latency)
+- timestamp -= latency;
+- else
+- timestamp = 0;
++ if (timestamp > latency)
++ timestamp -= latency;
++ else
++ timestamp = 0;
++ }
+ }
+
+ /* FIXME: use the timestamp from the buffer itself! */