Closed Bug 857831 Opened 12 years ago Closed 12 years ago

[music] m4a files should not be recognized as WBMP files in mimetype content sniffer

Categories

(Firefox OS Graveyard :: Gaia::Music, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:leo+, firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)

RESOLVED FIXED
B2G C4 (2jan on)
blocking-b2g leo+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: marcia, Assigned: schien)

References

()

Details

(Keywords: regression, Whiteboard: [CR 471581])

Attachments

(2 files, 2 obsolete files)

unagi, while running Mozilla RIL using:

Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/d467369d1b0c
Gaia   06e0e5ce42bdfb62bdbe38271de6b5b2d9e40e75
BuildID 20130403070204
Version 18.0

STR:
1. Load some MP4 files on the device. In my testing I was adding albums to my music collection to test the search feature
2. Try to play them

Expected: They will play
Actual: They do not play

The content I loaded in this build previously played in other versions. The content shows in the UI (Album name, etc) but nothing will play.
Assignee: nobody → chris.double
blocking-b2g: leo? → leo+
Can you attach an example MP4 file containing music that does not work please.
Is there a regression range?
I have emailed the file to Chris.

I will work on a regression range. The major change recently in music was the landing of the search feature.
QA Contact: mozillamarcia.knous
Attached file Logcat while trying to play the track (deleted) —
I ran logcat while I was trying to play the track, not sure how useful it will be.
I can confirm that playback doesn't work for me on an Otoro with the sample mp4 file. I see this in the logcat:

E/GeckoConsole(  470): [JavaScript Warning: "HTTP "Content-Type" of "image/vnd.wap.wbmp" is not supported. Load of media resource blob:7a8e556c-6b6f-44a6-893b-7d8ebc943eeb failed." {file: "app://music.gaiamobile.org/index.html#" line: 0}]

I don't know if it's related.
If I rename the music file from an .m4a to have a .mp4 extension it plays in the music app. Seems to have lost the association with m4a's for some reason.
For what it's worth, this doesn't occur in MC.  It happens in the v1 train.  Not sure about 1.0.1
FWIW, I've added https://github.com/mozilla/gaia-ui-tests/issues/619 so we can help catch this potentially regressing in the future.
Here is the regression range:

Works:
Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/406b86b4b515
Gaia   c5a8b6476f0dbc456061227a7801e56634683eb0
BuildID 20130319070203
Version 18.0

Broken:
Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/778da49486f0
Gaia   2a5ddb6758272227c1877b45984e053989189e36
BuildID 20130319230202
Version 18.0
(In reply to Marcia Knous [:marcia] from comment #9)
> Here is the regression range:

http://hg.mozilla.org/releases/mozilla-b2g18/pushloghtml?fromchange=406b86b4b515&tochange=778da49486f0

Given the error in comment 5 I'm thinking the WBMP patches:

c8405670d3bd	Shih-Chiang Chien — Bug 847310 - WBMP decoder implementation. r=joe, a=leo+
7bf4db4abef4	Shih-Chiang Chien — Bug 847310 - Test cases for WBMP decoder. r=joe, a=leo+
3b14247eeb6e	Ryan VanderMeulen — Bug 847310 - Fix include - b2g18 still uses imgIDecoderObserver.h. a=bustage
5651355a1499	Ryan VanderMeulen — Bug 847310 - More bustage fixes. a=bustage
778da49486f0	Ryan VanderMeulen — Bug 847310 - Yet another bustage fix. a=bustage
From http://hg.mozilla.org/releases/mozilla-b2g18/rev/c8405670d3bd:

+  // A well-defined type 0 WBMP file starts with an "0000 0000b" byte followed
+  // by an "0xx0 0000b" byte (x = don't care).
+  else if (aLength >= 2 && (static_cast<unsigned char>(aContents[0]) == 0x00 &&
+                            (static_cast<unsigned char>(aContents[1]) & 0x9F) == 0x00))
+  {
+    aContentType.AssignLiteral(IMAGE_WBMP);
+  }

Won't this catch any file beginning with 0x0000?
The WBMP header is too common for mime type sniffer, I'll remove it from imgLoader::GetMimeTypeFromContent().
(In reply to Shih-Chiang Chien [:schien] from comment #12)
> The WBMP header is too common for mime type sniffer, I'll remove it from
> imgLoader::GetMimeTypeFromContent().

Thanks, I'll assign this to you.
Assignee: chris.double → schien
Attached patch should not detect WBMP in content sniffer (obsolete) (deleted) — Splinter Review
WBMP header format is 0x0000, which is too common for mime type sniffer. Remove the header detection in imgLoader::GetMimeTypeFromContent().
Attachment #734526 - Flags: review?(joe)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #7)
> For what it's worth, this doesn't occur in MC.  It happens in the v1 train. 
> Not sure about 1.0.1
bug 799315 add m4a in extraMimeEntries and that's why m-c can detect mime type for m4a correctly. 1.0.1 should not have this issue since WBMP is not supported in 1.0.1.
Summary: [music] Not able to play MP4 files → [music] m4a files should not be recognized as WBMP files in mimetype content sniffer
Comment on attachment 734526 [details] [diff] [review]
should not detect WBMP in content sniffer

Hi Jeff, could you help review this patch since @joedrew is on PTO?
Attachment #734526 - Flags: review?(joe) → review?(jmuizelaar)
Attached patch should not detect WBMP in content sniffer (obsolete) (deleted) — Splinter Review
minor update, remove 1 unnecessary blank line in previous patch.
Attachment #734526 - Attachment is obsolete: true
Attachment #734526 - Flags: review?(jmuizelaar)
Attachment #735015 - Flags: review?(jmuizelaar)
Attachment #735015 - Flags: review?(jmuizelaar) → review+
Whiteboard: [CR 471581]
update reviewer information in hg log. carry r+

https://tbpl.mozilla.org/?tree=Try&rev=2ba7fd323e0a
Attachment #735015 - Attachment is obsolete: true
Attachment #736105 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/c6dae4b543df
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → B2G C4 (2jan on)
Verified fixed, Mozilla RIL, using:

Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/e0bab06d5d36
Gaia   9f537aa216f3c12725c8d1c5c9603370b6bc1c46
BuildID 20130418230203
Version 18.0

My m4a files now play fine using this build.
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: