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 744281 - printf: Add support for %I32
printf: Add support for %I32
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2015-02-10 17:37 UTC by Matej Knopp
Modified: 2015-03-12 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch (847 bytes, patch)
2015-02-10 17:37 UTC, Matej Knopp
none Details | Review

Description Matej Knopp 2015-02-10 17:37:41 UTC
Created attachment 296534 [details] [review]

libav seems to output some messages with %I32u which can't currently be printed by gstreamer printf
Comment 1 Tim-Philipp Müller 2015-02-10 23:30:06 UTC
Thanks, but what is it that adds those format modifiers? And what GLib version/OS?
Comment 2 Tim-Philipp Müller 2015-03-05 17:37:45 UTC
Comment 3 Matej Knopp 2015-03-05 18:10:48 UTC
I'm not sure how glib version is relevant here? Libav decoder logs message with given modifier and gst_debug_message_get uses __gst_vasprintf to print it. Where does glib or OS get into that?

As for what does those modifiers - It's a decoder warning. but i don't remember which decoder exactly and I wasn't able to find it with grep, the printf flags are probably put together in code (in libav).
Comment 4 Tim-Philipp Müller 2015-03-05 18:21:08 UTC
The reason I ask is that I was trying to figure out where that modifier comes from, since I couldn't see glib checking for it or setting it, so I was basically wondering if it was "wrong use" of some sorts or not (defined as not using standard modifiers or glib printf macros) Also, we might want to add more variants.
Comment 5 Matej Knopp 2015-03-05 18:25:41 UTC
I see. So the modifier comes from warning from libav decoder (not sure which one, sorry). It seems to be common on Windows platforms  

I don't remember now why I didn't put %I64u there as well.
Comment 6 Tim-Philipp Müller 2015-03-10 10:28:08 UTC
Does this mean this patch is completely untested then? :)
Comment 7 Matej Knopp 2015-03-10 14:08:58 UTC
Not sure what you mean. I tested it when I wrote it. I had a file that gave me decoder warning (from gst-libav) with %I32u in it. I didn't get any %I64u warnings so I didn't implement that :)

But I did test %I32u of course. The only thing is that I don't remember which file it was anymore :)
Comment 8 Tim-Philipp Müller 2015-03-12 13:40:15 UTC
I pushed this without the flags=32, which I think you made up or extrapolated from flags=64 ? (Since it broke the test for me)

commit 0c3f1850be69ec17855dbecb3c55efbd0ccdd9d2
Author: Tim-Philipp Müller <>
Date:   Thu Mar 12 13:26:59 2015 +0000

    tests: add some basic unit tests for our printf stuff
    To test new %I32 support.

commit b7f958abad667c0bdca6f2341d2d8e1bb6f7c49d
Author: Matej Knopp <>
Date:   Tue Feb 10 17:40:48 2015 +0100

    printf: add support for %I32
Comment 9 Matej Knopp 2015-03-12 13:55:07 UTC
Yeah, that sounds like something I might have done. Sorry. Looking at the code now the flags should have remained 0 of course.