Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-03 08:58:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-11-03 08:58:12 +0400
commitb7280cff9a7683395d7f899517b4aea8b52f12a4 (patch)
treeec113573a8f2d04a82db85d463ec86c16b0ec793 /libavformat
parente5927910c2a156e9ad6388413400b620d1dcf035 (diff)
asfdec: check stream_index for validity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asfdec.c2
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;