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.
This commit is contained in:
parent
5f6db60a4d
commit
0947ecf74c
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2008-04-30 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* gst/typefind/gsttypefindfunctions.c: (MpegVideoStreamCtx),
|
* gst/typefind/gsttypefindfunctions.c: (MpegVideoStreamCtx),
|
||||||
|
@ -789,10 +789,13 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet)
|
|||||||
|
|
||||||
/* calculate par
|
/* calculate par
|
||||||
* the info.aspect_* values reflect 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_num = dec->info.aspect_numerator;
|
||||||
par_den = dec->info.aspect_denominator;
|
par_den = dec->info.aspect_denominator;
|
||||||
if (par_num == 0 && par_den == 0) {
|
if (par_den == 0) {
|
||||||
par_num = par_den = 1;
|
par_num = par_den = 1;
|
||||||
}
|
}
|
||||||
/* theora has:
|
/* theora has:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user