Commit ee7388c9 authored by Michael Niedermayer's avatar Michael Niedermayer

fix segfault on broken streams

Originally committed as revision 4966 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4e295993
...@@ -959,11 +959,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 ...@@ -959,11 +959,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
p->pict_type= FF_I_TYPE; //FIXME I vs. P p->pict_type= FF_I_TYPE; //FIXME I vs. P
if(get_rac(c, &keystate)){ if(get_rac(c, &keystate)){
p->key_frame= 1; p->key_frame= 1;
read_header(f); if(read_header(f) < 0)
return -1;
clear_state(f); clear_state(f);
}else{ }else{
p->key_frame= 0; p->key_frame= 0;
} }
if(!f->plane[0].state && !f->plane[0].vlc_state)
return -1;
p->reference= 0; p->reference= 0;
if(avctx->get_buffer(avctx, p) < 0){ if(avctx->get_buffer(avctx, p) < 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment