diff flvenc.c @ 2590:307c3f7a7862 libavformat

avoid generating invalid files fixes issue213
author michael
date Tue, 09 Oct 2007 01:01:07 +0000
parents 33033ec6fc6c
children fb98ebeedd81
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;