changeset 3499:e54614e83ba4 libavformat

Prevent duration calculation code from generating random durations for vorbis in ogg.
author michael
date Tue, 24 Jun 2008 23:56:16 +0000
parents 30682688ca93
children 102f7d89c2c8
files utils.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Tue Jun 24 11:07:04 2008 +0000
+++ b/utils.c	Tue Jun 24 23:56:16 2008 +0000
@@ -541,6 +541,9 @@
     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;