diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-06-24 23:56:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-06-24 23:56:16 +0000 |
commit | 796d200a77a90e82897f1deac5513b9d903e8c21 (patch) | |
tree | 2a0f3320e55c774d611b694228f340e983fa4804 /libavformat/utils.c | |
parent | f67a10cd0c7fd9589e7fadfb8daeec8faba4cd39 (diff) | |
download | ffmpeg-streaming-796d200a77a90e82897f1deac5513b9d903e8c21.zip ffmpeg-streaming-796d200a77a90e82897f1deac5513b9d903e8c21.tar.gz |
Prevent duration calculation code from generating random durations for
vorbis in ogg.
Originally committed as revision 13958 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 845c87e..a6dc70e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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; |