diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-27 13:28:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-27 13:28:08 +0100 |
commit | 7eda2e524b8e2b645e0c62ccbe819594c03824cd (patch) | |
tree | 337ea62a4dd053cbf3d3c07277423cc37021817c /libavcodec/vc1_parser.c | |
parent | 46143d2555894ca1d5ef3c6e4446fb8f9cea0814 (diff) | |
download | ffmpeg-7eda2e524b8e2b645e0c62ccbe819594c03824cd.tar.gz |
avcodec/vc1_parser: check ff_vc1_parse_frame_header*() return value
Fixed CID739860
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1_parser.c')
-rw-r--r-- | libavcodec/vc1_parser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 1321320173..cc29ce148b 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -51,6 +51,7 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, for(start = buf, end = buf + buf_size; next < end; start = next){ int buf2_size, size; + int ret; next = find_next_marker(start + 4, end); size = next - start - 4; @@ -66,9 +67,12 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, break; case VC1_CODE_FRAME: if(vpc->v.profile < PROFILE_ADVANCED) - ff_vc1_parse_frame_header (&vpc->v, &gb); + ret = ff_vc1_parse_frame_header (&vpc->v, &gb); else - ff_vc1_parse_frame_header_adv(&vpc->v, &gb); + ret = ff_vc1_parse_frame_header_adv(&vpc->v, &gb); + + if (ret < 0) + break; /* keep AV_PICTURE_TYPE_BI internal to VC1 */ if (vpc->v.s.pict_type == AV_PICTURE_TYPE_BI) |