mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/h264dec: check number of SPS in is_extra
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9f60c58586
commit
b9d1f5bf68
@ -855,6 +855,8 @@ static int is_extra(const uint8_t *buf, int buf_size)
|
|||||||
{
|
{
|
||||||
int cnt= buf[5]&0x1f;
|
int cnt= buf[5]&0x1f;
|
||||||
const uint8_t *p= buf+6;
|
const uint8_t *p= buf+6;
|
||||||
|
if (!cnt)
|
||||||
|
return 0;
|
||||||
while(cnt--){
|
while(cnt--){
|
||||||
int nalsize= AV_RB16(p) + 2;
|
int nalsize= AV_RB16(p) + 2;
|
||||||
if(nalsize > buf_size - (p-buf) || (p[2] & 0x9F) != 7)
|
if(nalsize > buf_size - (p-buf) || (p[2] & 0x9F) != 7)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user