Bug 1320895 - Correct ADTS frame size calculation. r=gerald

This should be bitwise OR rather than logical OR, which just
returns 1. This code has clearly never worked, but it isn't
currently called.

MozReview-Commit-ID: 9Iuy7a7P85O

--HG--
extra : rebase_source : 4da35a507993ee761ac952259c1be3a974a8a0ac
This commit is contained in:
Ralph Giles 2016-11-30 13:23:18 -08:00
Родитель 34b48a7720
Коммит d20f7b6309
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -584,8 +584,8 @@ public:
return false;
}
size_t header_length = have_crc ? 9 : 7;
size_t data_length = (((*aData)[3] & 0x03) << 11) ||
(((*aData)[4] & 0xff) << 3) ||
size_t data_length = (((*aData)[3] & 0x03) << 11) |
(((*aData)[4] & 0xff) << 3) |
(((*aData)[5] & 0xe0) >> 5);
uint8_t frames = ((*aData)[6] & 0x03) + 1;
MOZ_ASSERT(frames > 0);