summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorBenjamin M. Schwartz <bens@alum.mit.edu>2010-02-08 11:21:35 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-02-08 11:21:35 +0100
commita09d9fdece3983a79e4d5a1ccb1ef55a21e158e1 (patch)
tree8281e325802ae5c286463617db175a2b6845ba31 /ext
parent6b8175d96a405c38bf39762f21255448052cb65e (diff)
theoradec: PARs of 0:x, x:0 and 0:0 are all allowed and map to 1:1
Fixes #609252.
Diffstat (limited to 'ext')
-rw-r--r--ext/theora/gsttheoradec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c
index 6eef4729d..b2f076a44 100644
--- a/ext/theora/gsttheoradec.c
+++ b/ext/theora/gsttheoradec.c
@@ -757,9 +757,7 @@ 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.
- * x:0 for other x isn't technically allowed, but it's seen in the wild and
- * is reasonable to treat the same.
+ * 0:x and x:0 are allowed and can be interpreted as 1:1.
*/
if (dec->have_par) {
/* we had a par on the sink caps, override the encoded par */
@@ -771,7 +769,7 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet)
par_num = dec->info.aspect_numerator;
par_den = dec->info.aspect_denominator;
}
- if (par_den == 0) {
+ if (par_num == 0 || par_den == 0) {
par_num = par_den = 1;
}
/* theora has: