OSDN Git Service

Fix calculations for an obscure combo of MPEG audio options.
authorJohn Grossman <johngro@google.com>
Wed, 29 Aug 2012 21:51:01 +0000 (14:51 -0700)
committerJohn Grossman <johngro@google.com>
Thu, 6 Sep 2012 17:18:38 +0000 (10:18 -0700)
commita39ad61a1c9c69c2cc60f5d14243dd56040f8571
tree244c5a5b7629f21a86a31a51afbad1ad91c3a124
parent0b73d4730202fcad53aefc4314a06e7b95f442f0
Fix calculations for an obscure combo of MPEG audio options.

MPEGv2 and MPEGv2.5 Layer 2 audio payloads should 1152 samples per
access unit, not 576.  Adjust the frame size and samples out
calculations accordingly.

Also, adjust the max frame size in the MP3Extractor's MediaSource to
be closer to the theoretical worst case max frame size.  The
theoretical worst case for MPEG audio is 2881 bytes per frame, but the
max frame size being used was 32kB.  It has been changed to be 4kB in
order to remain a power of 2 allocation, but to be the power of 2
closest to the worst case.

Change-Id: If11f5a843b06e70151bbe8298cc54f954938d9d7
media/libstagefright/MP3Extractor.cpp
media/libstagefright/avc_utils.cpp