mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
Improve coverage for RAW AVC protocol.
This commit is contained in:
parent
4a5323b054
commit
bf92172e62
1 changed files with 14 additions and 0 deletions
|
@ -256,6 +256,20 @@ VOID TEST(SrsAVCTest, AACDemuxADTS)
|
|||
{
|
||||
srs_error_t err;
|
||||
|
||||
// Fail if not adts format.
|
||||
if (true) {
|
||||
SrsRawAacStream h; char* frame = NULL; int nb_frame = 0; SrsRawAacStreamCodec codec;
|
||||
uint8_t b[] = {0xff, 0x09, 0x2c,0x40, 0,0xe0,0}; SrsBuffer buf((char*)b, sizeof(b));
|
||||
HELPER_EXPECT_FAILED(h.adts_demux(&buf, &frame, &nb_frame, codec));
|
||||
}
|
||||
|
||||
// Fail if less than 7 bytes.
|
||||
if (true) {
|
||||
SrsRawAacStream h; char* frame = NULL; int nb_frame = 0; SrsRawAacStreamCodec codec;
|
||||
uint8_t b[] = {0xff, 0xf9}; SrsBuffer buf((char*)b, sizeof(b));
|
||||
HELPER_EXPECT_FAILED(h.adts_demux(&buf, &frame, &nb_frame, codec));
|
||||
}
|
||||
|
||||
// For lower sampling rate, such as 5512HZ.
|
||||
if (true) {
|
||||
SrsRawAacStream h; char* frame = NULL; int nb_frame = 0; SrsRawAacStreamCodec codec;
|
||||
|
|
Loading…
Reference in a new issue