[gstreamer-bugs] [Bug 626618] jpegparse doesn't handle APP12 marker

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 13 10:12:56 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=626618
  GStreamer | gst-plugins-bad | git

--- Comment #27 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2010-08-13 17:12:49 UTC ---
(Apologies for the bikeshe^Hnitpicking)

IMHO the previous code was much nicer, and the new code doesn't look
particularly correct (e.g. passing 1 to g_utf8_validate as bytecount..) and it
also does an unnecessary alloc  - wouldn't it have been enough to just use
gst_byte_reader_get_string() instead of _get_data() and then do the
g_utf8_validate() on that? (Since _get_string() makes sure it's 0-terminated)?

Maybe something like:

static gboolean
ngst_byte_reader_get_string_utf8_checked (GstByteReader * b, const gchar ** s)
{
  if (!gst_byte_reader_get_string_utf8 (b, s))
    return FALSE;

  return g_utf8_validate (*s, -1, NULL);
}

would do the trick as well.

-- 
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