[FFmpeg-cvslog] r15119 - trunk/ffmpeg.c

pross subversion
Sun Aug 31 09:23:48 CEST 2008


Author: pross
Date: Sun Aug 31 09:23:48 2008
New Revision: 15119

Log:
Display error message when user attempts to resample non-S16 audio formats. Patch supplied by Daniel Serpell <daniel dot serpell at gmail dotcom>


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Sun Aug 31 09:23:48 2008
@@ -537,6 +537,10 @@ static void do_audio_out(AVFormatContext
         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) {




More information about the ffmpeg-cvslog mailing list