Merge commit '6fc8226e29055858f28973bb3d27b63b3b65e616'

* commit '6fc8226e29055858f28973bb3d27b63b3b65e616':
  vp3: Check the framerate for validity

Conflicts:
	libavcodec/vp3.c

See: a56d963f11
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-16 14:06:28 +02:00
commit b3970b3949
1 changed files with 5 additions and 1 deletions

View File

@ -2225,7 +2225,11 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
fps.num = get_bits_long(gb, 32);
fps.den = get_bits_long(gb, 32);
if (fps.num>0 && fps.den>0) {
if (fps.num && fps.den) {
if (fps.num < 0 || fps.den < 0) {
av_log(avctx, AV_LOG_ERROR, "Invalid framerate\n");
return AVERROR_INVALIDDATA;
}
av_reduce(&avctx->time_base.num, &avctx->time_base.den,
fps.den, fps.num, 1<<30);
}