diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 13:08:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 13:08:25 +0000 |
commit | ec892563ae41e5f694dcd3d68b0299478b1552c0 (patch) | |
tree | 6a9e90d918518e3464a6de359086aaff1eb9c334 /libavcodec/error_resilience.c | |
parent | e7316976650b429345da619c3acff38004aaf6b8 (diff) | |
download | ffmpeg-ec892563ae41e5f694dcd3d68b0299478b1552c0.tar.gz |
reset ref_index
Originally committed as revision 3690 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index c18d775bb6..98961236ee 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -666,6 +666,8 @@ void ff_er_frame_end(MpegEncContext *s){ int threshold_part[4]= {100,100,100}; int threshold= 50; int is_intra_likely; + int size = s->b8_stride * 2 * s->mb_height; + Picture *pic= s->current_picture_ptr; if(!s->error_resilience || s->error_count==0 || s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return; @@ -673,9 +675,6 @@ void ff_er_frame_end(MpegEncContext *s){ av_log(s->avctx, AV_LOG_INFO, "concealing %d errors\n", s->error_count); if(s->current_picture.motion_val[0] == NULL){ - int size = s->b8_stride * 2 * s->mb_height; - Picture *pic= s->current_picture_ptr; - av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); for(i=0; i<2; i++){ @@ -687,6 +686,11 @@ void ff_er_frame_end(MpegEncContext *s){ s->current_picture= *s->current_picture_ptr; } + for(i=0; i<2; i++){ + if(pic->ref_index[i]) + memset(pic->ref_index[i], 0, size * sizeof(uint8_t)); + } + if(s->avctx->debug&FF_DEBUG_ER){ for(mb_y=0; mb_y<s->mb_height; mb_y++){ for(mb_x=0; mb_x<s->mb_width; mb_x++){ |