# HG changeset patch # User michael # Date 1214351776 0 # Node ID e54614e83ba42a426c6ecf0bd903dd64db56ed1b # Parent 30682688ca936e78a9429ea104ea04834af5e428 Prevent duration calculation code from generating random durations for vorbis in ogg. diff -r 30682688ca93 -r e54614e83ba4 utils.c --- 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;