Browse Source

more info about why init failed

Originally committed as revision 3312 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 21 years ago
parent
commit
bb0b93ba81
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavcodec/mpegaudio.c

+ 6
- 2
libavcodec/mpegaudio.c View 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 */


Loading…
Cancel
Save