changeset 2124:6f44ab5ad03c libavcodec

more info about why init failed
author michael
date Wed, 14 Jul 2004 02:53:42 +0000
parents ef54decf5624
children b415b42d3c80
files mpegaudio.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudio.c	Wed Jul 14 01:32:14 2004 +0000
+++ b/mpegaudio.c	Wed Jul 14 02:53:42 2004 +0000
@@ -87,8 +87,10 @@
             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 @@
         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 */