avidec: Dont crash on avi packets that belong to dv streams in dv in avi

Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-04-17 17:42:09 +02:00
parent 9789b6ca48
commit 096231d497
1 changed files with 5 additions and 0 deletions

View File

@ -958,6 +958,11 @@ start_sync:
st = s->streams[n];
ast = st->priv_data;
if (!ast) {
av_log(s, AV_LOG_WARNING, "Skiping foreign stream %d packet\n", n);
continue;
}
if(s->nb_streams>=2){
AVStream *st1 = s->streams[1];
AVIStream *ast1= st1->priv_data;