diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2004-08-22 12:40:57 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2004-08-22 12:40:57 +0000 |
commit | ef859ca33f7aee637005de6ae9c5d380f2450fcc (patch) | |
tree | ab1eb587a0684729ad1bb3c0f2b58ac139d3c2a1 /libavcodec/sonic.c | |
parent | 33a4d8b1b2169d95e2b3d865633f3b26051c7578 (diff) | |
download | ffmpeg-ef859ca33f7aee637005de6ae9c5d380f2450fcc.tar.gz |
ffmpeg short conversion got fixed somewhere, no need to workaround it - fixes amplitude bug
Originally committed as revision 3408 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r-- | libavcodec/sonic.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 43e3051833..b9872386ff 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -501,10 +501,14 @@ static int sonic_encode_init(AVCodecContext *avctx) int i, version = 0; if (avctx->channels > MAX_CHANNELS) + { + av_log(avctx, AV_LOG_ERROR, "Only mono and stereo streams are supported by now\n"); return -1; /* only stereo or mono for now */ + } if (avctx->channels == 2) s->mid_side = 1; + if (avctx->codec->id == CODEC_ID_SONIC_LS) { s->lossless = 1; @@ -627,10 +631,12 @@ static int sonic_encode_frame(AVCodecContext *avctx, // short -> internal for (i = 0; i < s->frame_size; i++) { - if (samples[i] < 0) - s->int_samples[i] = samples[i]+32768; - else - s->int_samples[i] = samples[i]-32768; +// if (samples[i] < 0) +// s->int_samples[i] = samples[i]+32768; +// else +// s->int_samples[i] = samples[i]-32768; + s->int_samples[i] = samples[i]; +// av_log(NULL, AV_LOG_INFO, "%d\n", s->int_samples[i]); } if (!s->lossless) |