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 678163 - Refuses to play .ts files
Refuses to play .ts files
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-15 12:53 UTC by Edward Hervey
Modified: 2012-06-15 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
128k beginning of a mpeg-ts file (128.00 KB, application/octet-stream)
2012-06-15 13:08 UTC, Edward Hervey
Details

Description Edward Hervey 2012-06-15 12:53:44 UTC
Virtually all mpeg-ts dumps/files out there end in .ts

totem (and parser) refuse to play them because they're detected as text/vnd.trolltech.linguist

bilboed@hostia ~/work/devel/totem-pl-parser/plparse/tests $ ./parser --debug file:///home/bilboed/nowhere/678148/bbc-news-120615.ts 
_get_mime_type_for_name for 'file:///home/bilboed/nowhere/678148/bbc-news-120615.ts' returned 'text/vnd.trolltech.linguist'
URI 'file:///home/bilboed/nowhere/678148/bbc-news-120615.ts' was opened successfully in _get_mime_type_with_data
_get_mime_type_with_data for 'file:///home/bilboed/nowhere/678148/bbc-news-120615.ts' returned NULL, ignoring
** Message: Ignored URI "file:///home/bilboed/nowhere/678148/bbc-news-120615.ts".
Comment 1 Edward Hervey 2012-06-15 13:08:26 UTC
Created attachment 216511 [details]
128k beginning of a mpeg-ts file

This won't *actually* be playable completely, but a mpeg-ts demux will accept it as valid.
Comment 2 Bastien Nocera 2012-06-15 13:27:13 UTC
Thanks for the test case.

If you want to make the shared-mime-info magic checks better, the original bug was:
http://bugs.freedesktop.org/show_bug.cgi?id=14276

Feel free to file a bug there if you have a patch (or just want the problem recorded).

commit 374a4b782956bfc953c9b4b8cc3eae5a30414d92
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Jun 15 14:22:46 2012 +0100

    lib: Fix *.ts files being ignored
    
    The magic for the MP2T file is far too restrictive, and doesn't
    match a huge number of media files. When we see *.ts files, assume
    they're MP2T files instead of Qt Linguist translations.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678163

commit e3b8ffeaa706e40bdd939aeed9d39f5847fb33a4
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Jun 15 14:21:58 2012 +0100

    tests: Add test for ignored MP2T file
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678163