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 681368 - typefinding: CSV file is detected as MP3
typefinding: CSV file is detected as MP3
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.6
Other Linux
: Normal normal
: 1.0.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-07 11:50 UTC by Marcin Lewandowski
Modified: 2013-08-29 08:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase 1 - CSV (6.70 KB, text/csv)
2012-08-07 11:50 UTC, Marcin Lewandowski
Details
Testcase 2 - CSV (5.69 KB, text/csv)
2012-08-07 11:50 UTC, Marcin Lewandowski
Details
Testcase 1 - gst-launch output (2.21 KB, text/x-log)
2012-08-07 11:50 UTC, Marcin Lewandowski
Details
Testcase 2 - gst-launch output (2.21 KB, text/x-log)
2012-08-07 11:51 UTC, Marcin Lewandowski
Details

Description Marcin Lewandowski 2012-08-07 11:50:11 UTC
Created attachment 220542 [details]
Testcase 1 - CSV

Hi, I use default install of GStreamer 0.10.36 from Ubuntu 12.04 (32bit)

Please take a look on attached CSV files. They are interpreted as MP3.

Test commands I've used:

gst-launch -v filesrc location=fakemp3-1.csv ! decodebin2 ! fakesink
gst-launch -v filesrc location=fakemp3-2.csv ! decodebin2 ! fakesink
Comment 1 Marcin Lewandowski 2012-08-07 11:50:27 UTC
Created attachment 220543 [details]
Testcase 2 - CSV
Comment 2 Marcin Lewandowski 2012-08-07 11:50:48 UTC
Created attachment 220544 [details]
Testcase 1 - gst-launch output
Comment 3 Marcin Lewandowski 2012-08-07 11:51:00 UTC
Created attachment 220545 [details]
Testcase 2 - gst-launch output
Comment 4 André Klapper 2012-08-07 14:56:52 UTC
What exacly do you mean by "interpreted as MP3"?
Comment 5 Tim-Philipp Müller 2012-08-07 15:05:22 UTC
> What exacly do you mean by "interpreted as MP3"?

$ gst-typefind-0.10 ~/samples/misc/681368-typefinding-is-not-mp3-*
/home/tpm/samples/misc/681368-typefinding-is-not-mp3-1.csv - audio/mpeg, mpegversion=(int)1, layer=(int)1
/home/tpm/samples/misc/681368-typefinding-is-not-mp3-2.csv - audio/mpeg, mpegversion=(int)1, layer=(int)1
Comment 6 Marcin Lewandowski 2012-08-10 08:23:50 UTC
Exactly. Ah, my fault, it's not layer 3 but still typefind interprets that as an  audio/mpeg.
Comment 7 Marcin Lewandowski 2013-07-13 16:26:48 UTC
1.0.6 is still affected.
Comment 8 Tim-Philipp Müller 2013-07-23 11:08:02 UTC
Right, the problem is that this is UTF-16 LE with a BOM marker (FF FE) at the beginning, which the mp3 typefinder misinterprets as possible mp3 sync.

I'll see what we can do..
Comment 9 Tim-Philipp Müller 2013-07-25 12:21:36 UTC
commit ef5c6d351f04ff5d711912971d77c4be75963800
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Thu Jul 25 11:56:07 2013 +0100

    typefinding: don't detect mp3 based on just a few bits
    
    Remove dodgy code that detects mp3 with as little as
    a valid frame sync at the beginning. This was only used
    in some unit tests in -good where there were only a few
    bytes after the id3 tag. We now require at least two
    frame headers.
    
    Fixes mis-dection of text files with UTF-16 LE BOM as mp3.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681368



$ gst-typefind-1.0 ~/samples/misc/681368-typefinding-is-not-mp3-*
/home/tpm/samples/misc/681368-typefinding-is-not-mp3-1.csv - text/utf-16, endianness=(int)1234
/home/tpm/samples/misc/681368-typefinding-is-not-mp3-2.csv - text/utf-16, endianness=(int)1234
Comment 10 Marcin Lewandowski 2013-08-28 21:45:15 UTC
I can observe the same problem again in 1.0.8. Please see bug 707016 for more information.
Comment 11 Sebastian Dröge (slomo) 2013-08-29 08:42:04 UTC
The files attached here are still detected as plaintext with 1.1.4. Are you saying that the attached ones are again detected as MP3 for you or other files? Also, can you retest with 1.0.10?
Comment 12 Sebastian Dröge (slomo) 2013-08-29 08:43:51 UTC
Nevermind, that fix was never backported to the 1.0 branch. So was only fixed in 1.1.3 and later.

The fix will now be included in 1.0.11.