We cannot calculate the duration of vorbis packets even if we do know the

"minimal" frame_size.

Originally committed as revision 13969 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-06-25 18:15:04 +00:00
parent ff558537f0
commit c924ca78b6
1 changed files with 3 additions and 3 deletions

View File

@ -538,12 +538,12 @@ static int get_audio_frame_size(AVCodecContext *enc, int size)
{
int frame_size;
if(enc->codec_id == CODEC_ID_VORBIS)
return -1;
if (enc->frame_size <= 1) {
int bits_per_sample = av_get_bits_per_sample(enc->codec_id);
if(enc->codec_id == CODEC_ID_VORBIS)
return -1;
if (bits_per_sample) {
if (enc->channels == 0)
return -1;