diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-03-12 18:21:45 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-03-12 18:21:45 +0300 |
commit | 2ce1c2e063d91aa61844f65cad0819372b20dbd5 (patch) | |
tree | f6ca070d1ffd063a0caf01f05294d9df6e2a6048 /libavcodec/h264.c | |
parent | 382f3a5b6fed1ee381b8ba53cdfab680eb17173a (diff) |
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.
Originally committed as revision 22483 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 21ad65c901..6d7395cd28 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -961,8 +961,7 @@ int ff_h264_frame_start(H264Context *h){ 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); - /* some macroblocks will be accessed before they're available */ - if(FRAME_MBAFF || s->avctx->thread_count > 1) + /* some macroblocks can be accessed before they're available in case of lost slices, mbaff or threading*/ 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; |