[FFmpeg-cvslog] asfdec: check stream_index for validity
Michael Niedermayer
git at videolan.org
Sat Nov 3 06:07:34 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 3 05:58:12 2012 +0100| [b7280cff9a7683395d7f899517b4aea8b52f12a4] | committer: Michael Niedermayer
asfdec: check stream_index for validity
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7280cff9a7683395d7f899517b4aea8b52f12a4
---
libavformat/asfdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 535d510..8843901 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;
More information about the ffmpeg-cvslog
mailing list