mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
videodecoder: set decode only flag by decode only buffer
This is used for optimize frame drop issue. Some video streams such as av1 contains decode-only frames. These frames are handled by decoder but not show by display, which will cause input frame count unmatch the output frame count. After collecting more decoder only frame, it will cause error report "so many frame droped". So attach the flag GST_BUFFER_FLAG_DECODE_ONLY with the input buffer, the v4l2videodecoder can further handle the decode-only buffer in output list. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8142>
This commit is contained in:
parent
2d92a2ee54
commit
58696d57f9
1 changed files with 3 additions and 0 deletions
|
@ -2439,6 +2439,9 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder,
|
|||
|
||||
priv->input_offset += gst_buffer_get_size (buf);
|
||||
|
||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DECODE_ONLY))
|
||||
GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (priv->current_frame);
|
||||
|
||||
if (priv->packetized) {
|
||||
GstVideoCodecFrame *frame;
|
||||
gboolean was_keyframe = FALSE;
|
||||
|
|
Loading…
Reference in a new issue