commit | 1adff0be1c97a53bdb1645d7fe35bb0a82b516c1 | [log] [tgz] |
---|---|---|
author | Dongwon Kang <dwkang@google.com> | Fri Feb 23 08:59:27 2018 -0800 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Fri Apr 13 22:57:46 2018 +0000 |
tree | 06e23bb7ee3b48e51568fe16139781e7be9a59b3 | |
parent | 8d009272d0f683f07415da9e1a0e193f6d17c7d1 [diff] |
Handle bad bitrate index in mp3dec. Reference: https://www.mp3-tech.org/programmer/frame_header.html Test: run poc with and without this patch. Bug: 71868329 Change-Id: Ibf6196eba0b99459e84989ac8c13db57c816c572 (cherry picked from commit 8b638123760bd93958f6cc2f5c7c4f5dbd0a754a)
diff --git a/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp b/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp index d443b7c..bc5fd79 100644 --- a/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp +++ b/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp
@@ -184,7 +184,7 @@ info->emphasis = (temp << 30) >> 30; /* 2 */ - if (!info->bitrate_index || info->sampling_frequency == 3) + if (!info->bitrate_index || info->bitrate_index == 15 || info->sampling_frequency == 3) { err = UNSUPPORTED_FREE_BITRATE; }