diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-12-07 16:26:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-12-07 16:26:37 +0000 |
commit | 80f472506010a32a4211e537063e853a96544d2f (patch) | |
tree | 4e02ca741e913ce33e6fb3f3a85f867e79a6c0f1 | |
parent | 384af837259e2045bbdebd8416645c964d583ad0 (diff) | |
download | ffmpeg-80f472506010a32a4211e537063e853a96544d2f.tar.gz |
Get rid of audio_out2, it seems unneeded.
Originally committed as revision 20760 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffmpeg.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -219,7 +219,6 @@ static int64_t timer_start; static uint8_t *audio_buf; static uint8_t *audio_out; -static uint8_t *audio_out2; static short *samples; @@ -450,7 +449,6 @@ static int av_exit(int ret) av_free(sws_opts); av_free(audio_buf); av_free(audio_out); - av_free(audio_out2); av_free(samples); if (received_sigterm) { @@ -567,7 +565,7 @@ static void do_audio_out(AVFormatContext *s, /* SC: dynamic allocation of buffers */ if (!audio_buf) - audio_buf = av_malloc(2*MAX_AUDIO_PACKET_SIZE); + audio_buf = av_malloc(audio_out_size); if (!audio_out) audio_out = av_malloc(audio_out_size); if (!audio_buf || !audio_out) @@ -594,10 +592,6 @@ static void do_audio_out(AVFormatContext *s, #define MAKE_SFMT_PAIR(a,b) ((a)+SAMPLE_FMT_NB*(b)) if (!ost->audio_resample && dec->sample_fmt!=enc->sample_fmt && MAKE_SFMT_PAIR(enc->sample_fmt,dec->sample_fmt)!=ost->reformat_pair) { - if (!audio_out2) - audio_out2 = av_malloc(audio_out_size); - if (!audio_out2) - av_exit(1); if (ost->reformat_ctx) av_audio_convert_free(ost->reformat_ctx); ost->reformat_ctx = av_audio_convert_alloc(enc->sample_fmt, 1, @@ -671,7 +665,7 @@ static void do_audio_out(AVFormatContext *s, if (!ost->audio_resample && dec->sample_fmt!=enc->sample_fmt) { const void *ibuf[6]= {buftmp}; - void *obuf[6]= {audio_out2}; + void *obuf[6]= {audio_buf}; int istride[6]= {isize}; int ostride[6]= {osize}; int len= size_out/istride[0]; @@ -681,7 +675,7 @@ static void do_audio_out(AVFormatContext *s, av_exit(1); return; } - buftmp = audio_out2; + buftmp = audio_buf; size_out = len*osize; } |