Commit 0947ecf7 authored by Michael Smith's avatar Michael Smith

ext/theora/theoradec.c: Cool kids don't divide by zero.

Original commit message from CVS:
* ext/theora/theoradec.c:
Cool kids don't divide by zero.
Treat PAR of x:0 as 1:1.
Fixes #530719.
parent 5f6db60a
2008-04-30 Michael Smith <msmith@songbirdnest.com>
* ext/theora/theoradec.c:
Cool kids don't divide by zero.
Treat PAR of x:0 as 1:1.
Fixes #530719.
2008-04-30 Tim-Philipp Müller <tim.muller at collabora co uk>
* gst/typefind/gsttypefindfunctions.c: (MpegVideoStreamCtx),
......@@ -789,10 +789,13 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet)
/* calculate par
* the info.aspect_* values reflect PAR;
* 0:0 is allowed and can be interpreted as 1:1, so correct for it */
* 0:0 is allowed and can be interpreted as 1:1, so correct for it.
* x:0 for other x isn't technically allowed, but it's seen in the wild and
* is reasonable to treat the same.
*/
par_num = dec->info.aspect_numerator;
par_den = dec->info.aspect_denominator;
if (par_num == 0 && par_den == 0) {
if (par_den == 0) {
par_num = par_den = 1;
}
/* theora has:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment