Mercurial > libavcodec.hg
diff vc1.c @ 3694:8765ee4eaa45 libavcodec
Drop unneeded checks before av_free() and change to av_freep() where it's more suitable.
author | kostya |
---|---|
date | Sat, 09 Sep 2006 11:40:41 +0000 |
parents | e9be5d4bad80 |
children | 653fc28f78b4 |
line wrap: on
line diff
--- a/vc1.c Sat Sep 09 11:32:36 2006 +0000 +++ b/vc1.c Sat Sep 09 11:40:41 2006 +0000 @@ -4165,18 +4165,18 @@ // do parse frame header if(v->profile < PROFILE_ADVANCED) { if(vc1_parse_frame_header(v, &s->gb) == -1) { - if(buf2)av_free(buf2); + av_free(buf2); return -1; } } else { if(vc1_parse_frame_header_adv(v, &s->gb) == -1) { - if(buf2)av_free(buf2); + av_free(buf2); return -1; } } if(s->pict_type != I_TYPE && !v->res_rtm_flag){ - if(buf2)av_free(buf2); + av_free(buf2); return -1; } @@ -4186,7 +4186,7 @@ /* skip B-frames if we don't have reference frames */ if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)){ - if(buf2)av_free(buf2); + av_free(buf2); return -1;//buf_size; } /* skip b frames if we are in a hurry */ @@ -4194,12 +4194,12 @@ if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==B_TYPE) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=I_TYPE) || avctx->skip_frame >= AVDISCARD_ALL) { - if(buf2)av_free(buf2); + av_free(buf2); return buf_size; } /* skip everything if we are in a hurry>=5 */ if(avctx->hurry_up>=5) { - if(buf2)av_free(buf2); + av_free(buf2); return -1;//buf_size; } @@ -4211,7 +4211,7 @@ } if(MPV_frame_start(s, avctx) < 0) { - if(buf2)av_free(buf2); + av_free(buf2); return -1; } @@ -4243,7 +4243,7 @@ /* we substract 1 because it is added on utils.c */ avctx->frame_number = s->picture_number - 1; - if(buf2)av_free(buf2); + av_free(buf2); return buf_size; }