mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
H265: Support parse multiple NALUs in a frame. v6.0.3 (#3274)
1. Fix parsing multiple NALUs bug. 2. Eliminate duplicated code for parsing NALU. 3. Return error when HEVC not enabled.
This commit is contained in:
parent
02d47c5c21
commit
f316e9a0de
6 changed files with 61 additions and 81 deletions
|
@ -3525,6 +3525,10 @@ VOID TEST(KernelCodecTest, AVFrame)
|
|||
|
||||
if (true) {
|
||||
SrsVideoFrame f;
|
||||
SrsVideoCodecConfig cc;
|
||||
HELPER_EXPECT_SUCCESS(f.initialize(&cc));
|
||||
EXPECT_TRUE(f.vcodec() != NULL);
|
||||
|
||||
for (int i = 0; i < SrsMaxNbSamples; i++) {
|
||||
HELPER_EXPECT_SUCCESS(f.add_sample((char*)"\x05", 1));
|
||||
}
|
||||
|
@ -3534,6 +3538,21 @@ VOID TEST(KernelCodecTest, AVFrame)
|
|||
}
|
||||
}
|
||||
|
||||
VOID TEST(KernelCodecTest, AVFrameNoConfig)
|
||||
{
|
||||
srs_error_t err;
|
||||
|
||||
if (true) {
|
||||
SrsAudioFrame f;
|
||||
HELPER_EXPECT_SUCCESS(f.add_sample((char*)1, 10));
|
||||
}
|
||||
|
||||
if (true) {
|
||||
SrsVideoFrame f;
|
||||
HELPER_EXPECT_SUCCESS(f.add_sample((char*)"\x05", 1));
|
||||
}
|
||||
}
|
||||
|
||||
VOID TEST(KernelCodecTest, IsSequenceHeaderSpecial)
|
||||
{
|
||||
if (true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue