diff options
author | Peter Ross <pross@xvid.org> | 2008-08-31 07:23:48 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2008-08-31 07:23:48 +0000 |
commit | f0319383436e1abc3fc1464fe4e5f4dc40db3419 (patch) | |
tree | f1ac22840ee74f352bc2aa4e955f82505cea81de | |
parent | b4c3d835849bdf266123a5c5e701505efeedc9a8 (diff) | |
download | ffmpeg-f0319383436e1abc3fc1464fe4e5f4dc40db3419.tar.gz |
Display error message when user attempts to resample non-S16 audio formats.
Patch supplied by Daniel Serpell <daniel dot serpell at gmail dotcom>.
Originally committed as revision 15119 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -537,6 +537,10 @@ static void do_audio_out(AVFormatContext *s, ost->audio_resample = 1; if (ost->audio_resample && !ost->resample) { + if (dec->sample_fmt != SAMPLE_FMT_S16) { + fprintf(stderr, "Audio resampler only works with 16 bits per sample, patch welcome.\n"); + av_exit(1); + } ost->resample = audio_resample_init(enc->channels, dec->channels, enc->sample_rate, dec->sample_rate); if (!ost->resample) { |