diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-07-01 01:48:09 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-07-01 01:51:23 +0300 |
commit | bde998ce5052cf72d19faf5cc24185f1c9b70b1b (patch) | |
tree | 4d340c0cc3781a073b0bc11b54b488228202967f | |
parent | a28455f0ce221558ce56ac0507cf437d8418db8a (diff) |
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.
-rw-r--r-- | video/cdg/src/cdgdec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/cdg/src/cdgdec.rs b/video/cdg/src/cdgdec.rs index 3a7f311fd..5cb7ed0df 100644 --- a/video/cdg/src/cdgdec.rs +++ b/video/cdg/src/cdgdec.rs @@ -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), } } |