From 06c7b335058515bd6da0dc5c687c934a932c1237 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Sun, 22 May 2022 10:46:12 +0200 Subject: [PATCH] jpegdec: Enable packetized if sink caps contains parsed as true. jpegdec is capable to parse input frames, but if jpegparse is before, there's no need to reparse frames. This patch configure jpegdec as packetized, skipping parsing, if negotiated sink caps has the boolean field 'parsed' as true. Part-of: --- subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c b/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c index b251abc..a87c297 100644 --- a/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c +++ b/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c @@ -601,11 +601,17 @@ static gboolean gst_jpeg_dec_set_format (GstVideoDecoder * dec, GstVideoCodecState * state) { GstJpegDec *jpeg = GST_JPEG_DEC (dec); + GstStructure *structure; + gboolean parsed = FALSE; if (jpeg->input_state) gst_video_codec_state_unref (jpeg->input_state); jpeg->input_state = gst_video_codec_state_ref (state); + structure = gst_caps_get_structure (state->caps, 0); + gst_structure_get_boolean (structure, "parsed", &parsed); + gst_video_decoder_set_packetized (dec, parsed); + return TRUE; } -- 2.7.4