Mercurial > libavcodec.hg
comparison mpeg12.c @ 4353:d9cd0e5255d7 libavcodec
fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.mpg and http://sam.zoy.org/zzuf/lol-ffplay.m2v
author | michael |
---|---|
date | Mon, 15 Jan 2007 23:26:09 +0000 |
parents | d6f83e2f8804 |
children | c9ce397604f0 |
comparison
equal
deleted
inserted
replaced
4352:0ee71c12734e | 4353:d9cd0e5255d7 |
---|---|
3176 if(s2->first_slice){ | 3176 if(s2->first_slice){ |
3177 s2->first_slice=0; | 3177 s2->first_slice=0; |
3178 if(mpeg_field_start(s2) < 0) | 3178 if(mpeg_field_start(s2) < 0) |
3179 return -1; | 3179 return -1; |
3180 } | 3180 } |
3181 if(!s2->current_picture_ptr){ | |
3182 av_log(avctx, AV_LOG_ERROR, "current_picture not initalized\n"); | |
3183 return -1; | |
3184 } | |
3181 | 3185 |
3182 if(avctx->thread_count > 1){ | 3186 if(avctx->thread_count > 1){ |
3183 int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; | 3187 int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; |
3184 if(threshold <= mb_y){ | 3188 if(threshold <= mb_y){ |
3185 MpegEncContext *thread_context= s2->thread_context[s->slice_count]; | 3189 MpegEncContext *thread_context= s2->thread_context[s->slice_count]; |