diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2003-01-23 23:03:09 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2003-01-23 23:03:09 +0000 |
commit | 8e1e6f31c142aeb27d3dd7df539c47b35d7eb903 (patch) | |
tree | a1e73532f1654c52016b9ccaf233aa4add95dfd3 /libavcodec/ratecontrol.c | |
parent | 47e2a6e6c521a007f78b23ed554a1b81defef936 (diff) | |
download | ffmpeg-streaming-8e1e6f31c142aeb27d3dd7df539c47b35d7eb903.zip ffmpeg-streaming-8e1e6f31c142aeb27d3dd7df539c47b35d7eb903.tar.gz |
use av_malloc() functions - added av_strdup and av_realloc()
Originally committed as revision 1505 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index bda408d..6bcbe1c 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -751,8 +751,8 @@ static int init_pass2(MpegEncContext *s) } //printf("%lld %lld %lld %lld\n", available_bits[I_TYPE], available_bits[P_TYPE], available_bits[B_TYPE], all_available_bits); - qscale= malloc(sizeof(double)*rcc->num_entries); - blured_qscale= malloc(sizeof(double)*rcc->num_entries); + qscale= av_malloc(sizeof(double)*rcc->num_entries); + blured_qscale= av_malloc(sizeof(double)*rcc->num_entries); for(step=256*256; step>0.0000001; step*=0.5){ expected_bits=0; @@ -809,8 +809,8 @@ static int init_pass2(MpegEncContext *s) // printf("%f %d %f\n", expected_bits, (int)all_available_bits, rate_factor); if(expected_bits > all_available_bits) rate_factor-= step; } - free(qscale); - free(blured_qscale); + av_free(qscale); + av_free(blured_qscale); if(abs(expected_bits/all_available_bits - 1.0) > 0.01 ){ fprintf(stderr, "Error: 2pass curve failed to converge\n"); |