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 758754 - oggdemux: failing to play an Opus sample file
oggdemux: failing to play an Opus sample file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 1.7.1
Assigned To: Luis de Bethencourt
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-27 18:17 UTC by Luis de Bethencourt
Modified: 2015-12-01 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codec-utils: accept wrong version field in OpusHead header (1.49 KB, patch)
2015-11-28 15:08 UTC, Luis de Bethencourt
committed Details | Review

Description Luis de Bethencourt 2015-11-27 18:17:49 UTC
The following file:
http://xiph.org/~giles/2012/opus/detodos.opus

Which can be found here:
http://xiph.org/~giles/2012/opus/

Doesn't play with gst-play-1.0, yet it plays in the browser and other non-GStreamer players.

All other Opus samples I have play fine with gst-play-1.0.

I suspect the problem is in oggdemux.

I am investigating this and created a bug thread with the purpose of reporting the issue in case anyone else sees it and to keep track of my progress figuring it out.
Comment 1 Luis de Bethencourt 2015-11-27 18:21:00 UTC
oggdemux is in gst-plugins-base. My mistake.
Comment 2 Tim-Philipp Müller 2015-11-27 18:26:20 UTC
Plays fine for mem with 1.6 fwiw, so looks like a regression in git.
Comment 3 Luis de Bethencourt 2015-11-28 11:39:12 UTC
Thanks a lot for checking Tim. This means I can use git bisect to find the issue. Much better :)
Comment 4 Luis de Bethencourt 2015-11-28 15:08:26 UTC
Created attachment 316445 [details] [review]
codec-utils: accept wrong version field in OpusHead header

With this patch the file plays. And also this other sample which didn't:
http://xiph.org/~giles/2012/opus/ehren-paper_lights-64.opus

Problem was that the version field in the OpusHead header is wrong (0 instead of 1). Strange since 1 is the initial version of the spec.
https://wiki.xiph.org/OggOpus

The patch checks for the version and if it is wrong it logs the error and continues playing the file, instead of considering the file wrong.

Alternatively, it could check for both 0x00 and 0x01. Or it could just skip that field with gst_byte_reader_skip ().
Comment 5 Sebastian Dröge (slomo) 2015-12-01 15:29:19 UTC
Review of attachment 316445 [details] [review]:

::: gst-libs/gst/pbutils/codec-utils.c
@@ +1535,3 @@
+  version = gst_byte_reader_get_uint8_unchecked (&br);
+  if (version != 0x01) {
+    GST_DEBUG ("Opus Header version is wrong, should be 0x01 and not %d",

Make this a GST_ERROR() and accept only 0x00 and 0x01 at this point. If 0x02 or higher is found, reject it :)
Comment 6 Luis de Bethencourt 2015-12-01 15:51:00 UTC
Review of attachment 316445 [details] [review]:

commit 2a70c86e85a8ba07726212c8eece10fd92c88693
Author: Luis de Bethencourt <luisbg@osg.samsung.com>
Date:   Sat Nov 28 14:24:55 2015 +0000

    codec-utils: accept wrong version field in OpusHead header

    Some Opus files found on the wild have 0 in the version field of the
    OpusHead header, instead of the correct value of 1. The files still
    play, don't make this error fatal.

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