video/cdgdec: Box CdgInterpreter state to prevent GObject private size to become too big

Only 64k are allowed for the sum of all private instance structs in the
class hierarchy, as well as for the public instance structs.

The CdgInterpreter itself is huge and adding just another two integers
to GstVideoDecoderPrivate in libgstvideo is causing the limit to be
reached, so let's allocate it in a separate memory area.
This commit is contained in:
Sebastian Dröge 2020-07-01 01:48:09 +03:00
parent a28455f0ce
commit bde998ce50

View file

@ -18,7 +18,7 @@ use std::sync::Mutex;
use crate::constants::{CDG_HEIGHT, CDG_WIDTH};
struct CdgDec {
cdg_inter: Mutex<cdg_renderer::CdgInterpreter>,
cdg_inter: Mutex<Box<cdg_renderer::CdgInterpreter>>,
output_info: Mutex<Option<gst_video::VideoInfo>>,
}
@ -37,7 +37,7 @@ impl ObjectSubclass for CdgDec {
fn new() -> Self {
Self {
cdg_inter: Mutex::new(cdg_renderer::CdgInterpreter::new()),
cdg_inter: Mutex::new(Box::new(cdg_renderer::CdgInterpreter::new())),
output_info: Mutex::new(None),
}
}