diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 05:58:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 05:58:12 +0100 |
commit | b7280cff9a7683395d7f899517b4aea8b52f12a4 (patch) | |
tree | ec113573a8f2d04a82db85d463ec86c16b0ec793 | |
parent | e5927910c2a156e9ad6388413400b620d1dcf035 (diff) | |
download | ffmpeg-b7280cff9a7683395d7f899517b4aea8b52f12a4.tar.gz |
asfdec: check stream_index for validity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/asfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 535d5108c7..884390141c 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -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; |