summaryrefslogtreecommitdiff
path: root/ext/mpeg2enc/gstmpeg2enc.hh
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2021-08-30 23:26:39 +1000
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-09-06 14:14:50 +0000
commit640aad2b464d5aef0f38ef3405660f971f8221c4 (patch)
treebb9dccb2c7acf1f0c8dbe385dd748c95fd1577cb /ext/mpeg2enc/gstmpeg2enc.hh
parentcd3aa029d6b85405b2318be109bacaabe6522d1a (diff)
downloadgstreamer-plugins-bad-640aad2b464d5aef0f38ef3405660f971f8221c4.tar.gz
mpeg2enc: Only allow 1 pending frame for encoding
Having an unlimited input queue is very bad if the encoder can't run at real-time. Eventually it will consume all RAM. I don't really see any reason to have more than 1 outstanding encoded frame, so remove the queue and limit things to 1 pending frame. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2499>
Diffstat (limited to 'ext/mpeg2enc/gstmpeg2enc.hh')
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.hh4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/mpeg2enc/gstmpeg2enc.hh b/ext/mpeg2enc/gstmpeg2enc.hh
index fcc3fb933..369276b55 100644
--- a/ext/mpeg2enc/gstmpeg2enc.hh
+++ b/ext/mpeg2enc/gstmpeg2enc.hh
@@ -85,13 +85,11 @@ typedef struct _GstMpeg2enc {
gboolean eos;
/* flowreturn obtained by encoding task */
GstFlowReturn srcresult;
- /* frames for input */
- GQueue *frames;
gboolean started;
GstVideoCodecState *input_state;
-
+ GstVideoCodecFrame *pending_frame;
} GstMpeg2enc;
typedef struct _GstMpeg2encClass {