aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-13 23:03:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-14 00:03:42 +0100
commit1f1960519a1700985b5f645a2950c10581f78a73 (patch)
tree2a8f60ad4794df96fdec8cbf837d3c3a717ef9d9
parent334a0d15c6acd1ea607475d7ae24c949597b5de3 (diff)
downloadffmpeg-1f1960519a1700985b5f645a2950c10581f78a73.tar.gz
lxfdec: fix "no audio stream" check. avoid null ptrs deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/lxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index bf17d87a33..dbb5f53385 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -165,7 +165,7 @@ static int get_packet_header(AVFormatContext *s)
break;
case 1:
//audio
- if (!(st = s->streams[1])) {
+ if (!s->streams || !(st = s->streams[1])) {
av_log(s, AV_LOG_INFO, "got audio packet, but no audio stream present\n");
break;
}