1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix the bug of h.264 bit stream demux.

This commit is contained in:
winlin 2015-04-04 18:24:07 +08:00
parent 3fcc26a499
commit 6e2d756e1b
2 changed files with 8 additions and 1 deletions

View file

@ -876,6 +876,13 @@ int SrsAvcAacCodec::avc_demux_sps()
// XX 00 00 03 XX, the 03 byte should be drop.
if (nb_rbsp > 2 && rbsp[nb_rbsp - 2] == 0 && rbsp[nb_rbsp - 1] == 0 && rbsp[nb_rbsp] == 3) {
// read 1byte more.
if (stream.empty()) {
break;
}
rbsp[nb_rbsp] = stream.read_1bytes();
nb_rbsp++;
continue;
}