1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-01 08:54:48 +02:00

Prevent duration calculation code from generating random durations for

vorbis in ogg.

Originally committed as revision 13958 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-06-24 23:56:16 +00:00
parent f67a10cd0c
commit 796d200a77

View File

@ -541,6 +541,9 @@ static int get_audio_frame_size(AVCodecContext *enc, int size)
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;