changeset 2590:307c3f7a7862 libavformat

avoid generating invalid files fixes issue213
author michael
date Tue, 09 Oct 2007 01:01:07 +0000
parents 960795567b33
children fb98ebeedd81
files flvenc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flvenc.c	Mon Oct 08 13:06:48 2007 +0000
+++ b/flvenc.c	Tue Oct 09 01:01:07 2007 +0000
@@ -66,8 +66,10 @@
             break;
         case     8000: //nellymoser only
         case     5512: //not mp3
+            if(enc->codec_id != CODEC_ID_MP3){
             flags |= FLV_SAMPLERATE_SPECIAL;
             break;
+            }
         default:
             av_log(enc, AV_LOG_ERROR, "flv does not support that sample rate, choose from (44100, 22050, 11025).\n");
             return -1;