diff options
author | Philippe Normand <philn@igalia.com> | 2020-01-13 09:06:02 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-01-13 19:14:52 +0000 |
commit | 2e40379e7ace9c43d9edebe9556b37b541c67da7 (patch) | |
tree | 1030a41b41438d4a6821aaecd3aeaf297cfb95fa | |
parent | 46544d7c41fecab52d870f35f27a479acd6fd61e (diff) | |
download | gstreamer-plugins-base-2e40379e7ace9c43d9edebe9556b37b541c67da7.tar.gz |
oggstream: Workaround for broken PAR in VP8 BOS
Similarily to the Theora mapping, process 0:N, N:0 and 0:0 pixel aspect ratios
as 1:1.
Fixes #719
-rw-r--r-- | ext/ogg/gstoggstream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index cdb6fa6ad..3894ae741 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -677,6 +677,11 @@ setup_vp8_mapper (GstOggStream * pad, ogg_packet * packet) pad->n_header_packets = 2; pad->frame_size = 1; + /* PAR of 0:N, N:0 and 0:0 is not explicitely allowed, but the best we can do + * here is to map to 1:1 so that caps negotiation doesn't break downstream. */ + if (par_n == 0 || par_d == 0) + par_n = par_d = 1; + pad->caps = gst_caps_new_simple ("video/x-vp8", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, |