After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793838 - rtsp-media: g_print() format string for latency is incorrect
rtsp-media: g_print() format string for latency is incorrect
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.13.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-26 12:48 UTC by Carlos Rafael Giani
Modified: 2018-02-26 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
format string patch (1.09 KB, patch)
2018-02-26 12:49 UTC, Carlos Rafael Giani
none Details | Review
g_print replacement patch (1.13 KB, patch)
2018-02-26 13:18 UTC, Carlos Rafael Giani
needs-work Details | Review
g_print replacement patch v2 (1.13 KB, patch)
2018-02-26 13:20 UTC, Carlos Rafael Giani
committed Details | Review

Description Carlos Rafael Giani 2018-02-26 12:48:27 UTC
The "g_print ("setting latency to %lu %lu\n", min, max);" line should not use %lu, since the min/max values are 64-bit integers.
Comment 1 Carlos Rafael Giani 2018-02-26 12:49:36 UTC
Created attachment 368935 [details] [review]
format string patch
Comment 2 Sebastian Dröge (slomo) 2018-02-26 13:03:06 UTC
Comment on attachment 368935 [details] [review]
format string patch

This should not g_print() at all. Please change it to a GST_DEBUG() or so.
Comment 3 Carlos Rafael Giani 2018-02-26 13:04:52 UTC
Yeah, I was wondering why this uses g_print(). I'll change it.
Comment 4 Carlos Rafael Giani 2018-02-26 13:18:24 UTC
Created attachment 368937 [details] [review]
g_print replacement patch

This replaces the g_print() log line and uses GST_TIME_FORMAT for better readability of the min/max latency.
Comment 5 Carlos Rafael Giani 2018-02-26 13:20:08 UTC
Created attachment 368938 [details] [review]
g_print replacement patch v2

Typo
Comment 6 Sebastian Dröge (slomo) 2018-02-26 13:20:35 UTC
Review of attachment 368937 [details] [review]:

::: gst/rtsp-server/rtsp-media.c
@@ +1923,3 @@
       g_object_set (data->appsrc, "min-latency", min, "max-latency", max, NULL);
+      GST_DEBUG ("setting latency to min %" GST_TIME_FORMAT " max %"
+          GST_TIME_FORMAT "\n", GST_TIME_ARGS (min), GST_TIME_ARGS (max));

Without "\n" :)
Comment 7 Carlos Rafael Giani 2018-02-26 13:21:17 UTC
Yep, that was the typo :)
Comment 8 Sebastian Dröge (slomo) 2018-02-26 13:27:36 UTC
commit 5f29712243e567d1ffcc2356654dfac00b46a5ee (HEAD -> master)
Author: Carlos Rafael Giani <dv@pseudoterminal.org>
Date:   Mon Feb 26 14:16:54 2018 +0100

    rtsp-media: Replace g_print() log line
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793838