Commit 6ae2f9aa authored by michael's avatar michael

Always reset slice_table.

Previously, the area of a lost slice would be left at the slice number of the previous
frame which could occasionally match the number of the next slice and thus a non existing
slice could have been used for prediction leading to additional decoding errors in otherwise
undamaged slices.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22483 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e3a76ca4
...@@ -961,8 +961,7 @@ int ff_h264_frame_start(H264Context *h){ ...@@ -961,8 +961,7 @@ int ff_h264_frame_start(H264Context *h){
if(!h->thread_context[i]->s.obmc_scratchpad) if(!h->thread_context[i]->s.obmc_scratchpad)
h->thread_context[i]->s.obmc_scratchpad = av_malloc(16*2*s->linesize + 8*2*s->uvlinesize); h->thread_context[i]->s.obmc_scratchpad = av_malloc(16*2*s->linesize + 8*2*s->uvlinesize);
/* some macroblocks will be accessed before they're available */ /* some macroblocks can be accessed before they're available in case of lost slices, mbaff or threading*/
if(FRAME_MBAFF || s->avctx->thread_count > 1)
memset(h->slice_table, -1, (s->mb_height*s->mb_stride-1) * sizeof(*h->slice_table)); memset(h->slice_table, -1, (s->mb_height*s->mb_stride-1) * sizeof(*h->slice_table));
// s->decode= (s->flags&CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.reference /*|| h->contains_intra*/ || 1; // s->decode= (s->flags&CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.reference /*|| h->contains_intra*/ || 1;
......
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