mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-22 05:40:27 +08:00
asfdec: check stream_index for validity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b7280cff9a)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Carl Eugen Hoyos
parent
e432bd071c
commit
41bcde6021
@@ -972,7 +972,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
|
||||
case 0x54:
|
||||
aspect.num = avio_r8(pb);
|
||||
aspect.den = avio_r8(pb);
|
||||
if (aspect.num > 0 && aspect.den > 0) {
|
||||
if (aspect.num > 0 && aspect.den > 0 && asf->stream_index >= 0) {
|
||||
s->streams[asf->stream_index]->sample_aspect_ratio = aspect;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user