1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2012-11-13 23:03:38 +01:00
parent 334a0d15c6
commit 1f1960519a

View File

@ -165,7 +165,7 @@ static int get_packet_header(AVFormatContext *s)
break; break;
case 1: case 1:
//audio //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"); av_log(s, AV_LOG_INFO, "got audio packet, but no audio stream present\n");
break; break;
} }