summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-22 18:29:14 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-25 11:30:50 -0400
commitd0a196962a82f26a06357efd843488ae62fabea7 (patch)
treedd9a778c7efceba9e4b394467d800f1357c08675 /avconv.c
parentf540ca22c5fb4504d959c295f55591a9ec2a8859 (diff)
g722dec: remove the use of lowres for half-rate decoding.
It is broken because an AVCodecContext can be opened/closed multiple times, and sample_rate is getting divided by 2 each time that happens. This removes the only use of lowres for audio.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/avconv.c b/avconv.c
index 96f6059980..f93c9fa8d5 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2074,11 +2074,8 @@ static int transcode_init(OutputFile *output_files,
return AVERROR(ENOMEM);
}
ost->reformat_pair = MAKE_SFMT_PAIR(AV_SAMPLE_FMT_NONE,AV_SAMPLE_FMT_NONE);
- if (!codec->sample_rate) {
+ if (!codec->sample_rate)
codec->sample_rate = icodec->sample_rate;
- if (icodec->lowres)
- codec->sample_rate >>= icodec->lowres;
- }
choose_sample_rate(ost->st, ost->enc);
codec->time_base = (AVRational){1, codec->sample_rate};
if (codec->sample_fmt == AV_SAMPLE_FMT_NONE)