mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2464>
This commit is contained in:
parent
f4bdc79a07
commit
06c7b33505
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue