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 779755 - Timecodes get serialized as flagsets
Timecodes get serialized as flagsets
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: 1.11.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-08 15:59 UTC by Vivia Nikolaidou
Modified: 2017-03-09 01:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstvalue: Do more checks when guessing at flagset strings (5.45 KB, patch)
2017-03-09 01:04 UTC, Jan Schmidt
committed Details | Review

Description Vivia Nikolaidou 2017-03-08 15:59:46 UTC
#include <gst/gst.h>
#include <string.h>

int
main (int argc, char **argv)
{
  const gchar *serialized_structure = "dummy, timecode=00:01:00:00";
  GstStructure *s;

  gst_init (&argc, &argv);

  s = gst_structure_from_string (serialized_structure, NULL);
  gst_println ("Structure to string: %s", gst_structure_to_string (s));

  return 0;
}

===============

$ ./serialize 
Structure to string: dummy, timecode=(flagset)0:1;
Comment 1 Jan Schmidt 2017-03-08 23:38:44 UTC
I think you mean *deserialised* right? It's only being serialised as a flagset in the first place because it's interpreted that way in the string.
Comment 2 Jan Schmidt 2017-03-09 01:04:56 UTC
Created attachment 347517 [details] [review]
gstvalue: Do more checks when guessing at flagset strings

If guessing that a string matches a flagset, be more thorough
at checking that the string following a string of hex:hex:
actually looks like a flag set string. Add some unit tests
to catch more cases.
Comment 3 Jan Schmidt 2017-03-09 01:10:42 UTC
Pushed as d781d0