Skip to content
Snippets Groups Projects
Commit b7280cff authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

asfdec: check stream_index for validity

parent e5927910
No related branches found
No related tags found
No related merge requests found
......@@ -975,7 +975,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment