aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-28 00:10:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-28 00:10:34 +0000
commitfce88d52ca0b694a614e2cf030c3f622db65b164 (patch)
tree2aa15bec97e229ca5b03ca2b0186c5438e19df24 /libavformat/avidec.c
parent9d4cd3bfd5364ce6eeb77be9e9f5bcdbb9678772 (diff)
downloadffmpeg-fce88d52ca0b694a614e2cf030c3f622db65b164.tar.gz
Fixes NULL pointer dereference CID66
Originally committed as revision 13483 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index a84acf8e28..06576c313c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -650,6 +650,9 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
best_stream_index= i;
}
}
+ if(!best_st)
+ return -1;
+
best_ast = best_st->priv_data;
best_ts= av_rescale(best_ts, best_st->time_base.den, AV_TIME_BASE * (int64_t)best_st->time_base.num); //FIXME a little ugly
if(best_ast->remaining)