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 106448 - [0.6.1] [PATCH] vorbis plugin detection fix
[0.6.1] [PATCH] vorbis plugin detection fix
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.6.0
Other Linux
: Normal normal
: 0.6.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-18 19:55 UTC by Marinus Schraal
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ogg with id3 tag detection fix (1.21 KB, patch)
2003-02-18 19:57 UTC, Marinus Schraal
none Details | Review
this does do the above - any better? (1.41 KB, patch)
2003-04-06 14:09 UTC, Ronald Bultje
none Details | Review
oops - try#2 (1.41 KB, patch)
2003-04-06 14:10 UTC, Ronald Bultje
none Details | Review

Description Marinus Schraal 2003-02-18 19:55:41 UTC
This patch fixes detection of bad oggs with ID3 tags, which is ofcourse no
good but it happens quite a lot. The patch is fairly obvious, the old
detection is still there (if it sais '\x01vorbis' at the start) i left it
in there as fast solution for non id3tagged oggs (most of them), then it
proceeds over the full sniff buffer to see if the identification header is
somewhere further on (which happens if there's an id3 tag placed in front)
and in all other cases it returns NULL.

For me this fixes playing/detection of these files in nautilus-audio-view,
rhythmbox from cvs and metadate in nautilus properties tab.
Comment 1 Marinus Schraal 2003-02-18 19:57:50 UTC
Created attachment 14421 [details] [review]
ogg with id3 tag detection fix
Comment 2 Benjamin Otte (Company) 2003-02-21 16:29:53 UTC
2 comments:

1) This typefind misses the oligatory check "if (size < sizeof
(gulong)) return NULL;" at the beginning.
2) I believe this code is too general, because it scans the whole 
buffer for the text "vorbis" which could easily be included in other 
files. (iE an mp3 wih iDv2 Title "vorbis speech" or some such)

The right way would be to write it the way that the IDv2 stuff at the 
beginning of the file is skipped and you look exactly after that.
I believe Mp3 typefinding already does this.
Comment 3 Marinus Schraal 2003-02-21 18:17:48 UTC
1) That wasn't there in the first place..
2) It scans vor the vorbis identification header which is
'\0x01vorbis', i think that should be good enough. The initial check
actually only checks if it is an ogg container and only checks for the
string 'OggS' at the start, which is even more general.

I don't think the id3 header is of a known length, so it might take
more time than this trick. And what the mp3 typefinder does is of no
relevance here.
Comment 4 Ronald Bultje 2003-04-06 14:09:15 UTC
Created attachment 15509 [details] [review]
this does do the above - any better?
Comment 5 Ronald Bultje 2003-04-06 14:10:37 UTC
Created attachment 15510 [details] [review]
oops - try#2
Comment 6 Ronald Bultje 2003-04-06 14:11:25 UTC
This one:
* fixes indenting
* makes sure size is big enough
* uses guint32 instead of gulong (we *want* 32bits here)

Anything else needed for this to be applied?
Comment 7 Ronald Bultje 2003-04-07 17:04:48 UTC
Applied to 0.6.1 CVS.