[Bug 757049] tsdemux: Add support for Opus

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Oct 30 12:16:57 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=757049

--- Comment #39 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 314515
  --> https://bugzilla.gnome.org/attachment.cgi?id=314515
tsdemux: Add support for Opus

Sorry, one more nitpick:

>+static void
>+parse_opus_access_unit (TSDemuxStream * stream)
>+{
>+  ...
>+
>+  if (stream->current_size < 2) {
>+    goto error;
>+  }
>+
>+  id = GST_READ_UINT16_BE (stream->data);
>+  /* No control header */
>+  if ((id >> 5) != 0x3ff) {
>+    return;
>+  }
>+
>+  gst_byte_reader_init (&reader, stream->data, stream->current_size);
>+  gst_byte_reader_skip_unchecked (&reader, 2);

Any reason not to just init the byte reader first thing and then do

  if (!gst_byte_reader_get_uint16_be (...))
    goto error;

?

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