Browse Source

asfdec: check stream_index for validity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
b7280cff9a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/asfdec.c

+ 1
- 1
libavformat/asfdec.c View File

@@ -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;


Loading…
Cancel
Save