]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudio.c
well that does not need to be there anymore
[ffmpeg] / libavcodec / mpegaudio.c
index a6fe951c0ca4595db2a1ce82e0b30b18c8e88840..ac773865ec98b3132118326ab6f3fc9e6cabb515 100644 (file)
@@ -87,8 +87,10 @@ static int MPA_encode_init(AVCodecContext *avctx)
             break;
         }
     }
-    if (i == 3)
+    if (i == 3){
+        av_log(avctx, AV_LOG_ERROR, "Sampling rate %d is not allowed in mp2\n", freq);
         return -1;
+    }
     s->freq_index = i;
 
     /* encoding bitrate & frequency */
@@ -96,8 +98,10 @@ static int MPA_encode_init(AVCodecContext *avctx)
         if (mpa_bitrate_tab[s->lsf][1][i] == bitrate) 
             break;
     }
-    if (i == 15)
+    if (i == 15){
+        av_log(avctx, AV_LOG_ERROR, "bitrate %d is not allowed in mp2\n", bitrate);
         return -1;
+    }
     s->bitrate_index = i;
 
     /* compute total header size & pad bit */
@@ -117,7 +121,7 @@ static int MPA_encode_init(AVCodecContext *avctx)
     s->alloc_table = alloc_tables[table];
 
 #ifdef DEBUG
-    printf("%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n", 
+    av_log(avctx, AV_LOG_DEBUG, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n", 
            bitrate, freq, s->frame_size, table, s->frame_frac_incr);
 #endif