From dad4cb8b577873adc10ff441276b8ce612826454 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 15 Sep 2005 16:09:25 +0000 Subject: [PATCH] The upper three bits are reserved and not guaranteed to be 0. --- src/common/mpeg4_common.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/mpeg4_common.cpp b/src/common/mpeg4_common.cpp index 699635c30..4533158c7 100644 --- a/src/common/mpeg4_common.cpp +++ b/src/common/mpeg4_common.cpp @@ -606,6 +606,7 @@ mpeg4_p10_extract_par(uint8_t *&buffer, nalu.clear(); num_sps = avcc.read_uint8(); new_avcc.write_uint8(num_sps); + num_sps &= 0x1f; mxverb(4, "mpeg4_p10_extract_par: num_sps %d\n", num_sps); for (sps = 0; sps < num_sps; sps++) {