comparison error_resilience.c @ 1731:c3579468d42c libavcodec

memleak fix
author michael
date Thu, 08 Jan 2004 18:24:35 +0000
parents dea5b2946999
children 07a484280a82
comparison
equal deleted inserted replaced
1730:0e7f1aabd498 1731:c3579468d42c
671 671
672 av_log(s->avctx, AV_LOG_INFO, "concealing errors\n"); 672 av_log(s->avctx, AV_LOG_INFO, "concealing errors\n");
673 673
674 if(s->current_picture.motion_val[0] == NULL){ 674 if(s->current_picture.motion_val[0] == NULL){
675 int size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2); 675 int size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);
676 Picture *pic= s->current_picture_ptr;
676 677
677 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); 678 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
678 679
679 s->current_picture.motion_val[0]= av_mallocz(size * 2 * sizeof(int16_t)); //FIXME 680 for(i=0; i<2; i++){
680 s->current_picture.motion_val[1]= av_mallocz(size * 2 * sizeof(int16_t)); 681 pic->motion_val_base[i]= av_mallocz((size+1) * 2 * sizeof(uint16_t)); //FIXME size
682 pic->motion_val[i]= pic->motion_val_base[i]+1;
683 }
684 pic->motion_subsample_log2= 3;
685 s->current_picture= *s->current_picture_ptr;
681 } 686 }
682 687
683 if(s->avctx->debug&FF_DEBUG_ER){ 688 if(s->avctx->debug&FF_DEBUG_ER){
684 for(mb_y=0; mb_y<s->mb_height; mb_y++){ 689 for(mb_y=0; mb_y<s->mb_height; mb_y++){
685 for(mb_x=0; mb_x<s->mb_width; mb_x++){ 690 for(mb_x=0; mb_x<s->mb_width; mb_x++){