libstagefright MPEG2TS assertion failure with CHECK_EQ(br.getBits(4),1u) and crash [@android::MPEG2PSExtractor::dequeuePES]

RESOLVED WORKSFORME

Status

()

--
critical
RESOLVED WORKSFORME
6 years ago
a year ago

People

(Reporter: posidron, Unassigned)

Tracking

(Blocks: 1 bug, {crash, testcase})

Trunk
ARM
Gonk (Firefox OS)
crash, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [b2g-crash], crash signature)

Attachments

(1 attachment)

1.28 MB, application/force-download
Details
(Reporter)

Description

6 years ago
Created attachment 748558 [details]
testcase

STR

* In the folder of the testcase run: python3.3 -m http.server
* Open the Firefox app in the B2G emulator
* Attach GDB to the highest plugin-container process id
* Open the .mp4 file inside the Firefox app


The following CHECK fails:

"frameworks/base/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp:419 CHECK_EQ( br.getBits(4),1u) failed: 15 vs. 1"


Tested inside the B2G emulator.
Build fingerprint: 'Android/full/generic:4.0.4.0.4.0.4/OPENMASTER/eng.cdiehl.20130423.062518:eng/test-keys'

Comment 1

6 years ago
Looks like a bug in libstagefright. Adding Sotaro who's the expert in that area.
File name's extension is mp4. But the file content seems Mpeg2 ps, not mp4.
Christoph, how do you get the video?
(Reporter)

Comment 4

6 years ago
I renamed the file to .mp4 because the original extension did not play automatically in the Firefox app.
What is the intent of the test? Mpeg2 is not supproted format in Firefox OS.
(In reply to Christoph Diehl [:cdiehl] from comment #4)
> I renamed the file to .mp4

From where do you get the file?
(Reporter)

Comment 7

6 years ago
Found the file on some random site returned by Google. If it is not supported why are we parsing it? :-)
Firefox OS does not modify android's stagefright so far. The stagefright do not watch files' extension when doing a playback. It sniffs the media file. Android's device normally control supporting media formats by modifying DataSource::RegisterDefaultSniffers().

http://androidxref.com/4.0.4/xref/frameworks/base/media/libstagefright/DataSource.cpp#105
And recently, Firefox add only aac and amr file format support only for local app in Bug 847006. So, supported media formats are different between web content and local app.

Comment 10

6 years ago
(In reply to Sotaro Ikeda [:sotaro] from comment #9)
> And recently, Firefox add only aac and amr file format support only for
> local app in Bug 847006. So, supported media formats are different between
> web content and local app.

Can we tell stagefright to return an error rather than assert when sniffing content?
> Can we tell stagefright to return an error rather than assert when sniffing
> content?

What is the the assert? stagefright do not call assert during sniffing. Stagefright call assert when parsing for playback.
Call stagefright's sniffing can be moved into OmxDecoder in gecko and can create android::MediaExtractor by specifying mime type.
comment #12 is like move MediaExtractor::Create()'s implementation to OmxDecoder.

http://androidxref.com/4.0.4/xref/frameworks/base/media/libstagefright/MediaExtractor.cpp#53
(Reporter)

Updated

6 years ago
Blocks: 872136
Component: Audio/Video → Audio/Video: Playback

Updated

3 years ago
Crash Signature: [@ __libc_android_abort | __android_log_assert | android::MPEG2PSExtractor::dequeuePES()] → [@ __libc_android_abort | __android_log_assert | android::MPEG2PSExtractor::dequeuePES()] [@ __libc_android_abort | __android_log_assert | android::MPEG2PSExtractor::dequeuePES]
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.