mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
vtdec: Use GST_VIDEO_DECODER_ERROR instead of aborting when frame has an ERROR flag
This was already being used in handle_frame() for errors that happen when queueing a frame for decoding, let's do the same when a frame is flagged with an error in the output callback. From quick testing, this makes seeking more reliable (previously, it would sometimes cause a decoding error and shut the whole decoder down due to GST_FLOW_ERROR). Also manually sets the max error count to actually stop processing if too many errors occur. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7044>
This commit is contained in:
parent
a0b35d86f9
commit
691ee34729
1 changed files with 3 additions and 3 deletions
|
@ -332,10 +332,10 @@ gst_vtdec_output_loop (GstVtdec * vtdec)
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (vtdec);
|
GST_VIDEO_DECODER_STREAM_LOCK (vtdec);
|
||||||
|
|
||||||
if (frame->flags & VTDEC_FRAME_FLAG_ERROR) {
|
if (frame->flags & VTDEC_FRAME_FLAG_ERROR) {
|
||||||
GST_LOG_OBJECT (vtdec, "ignoring frame %d because of error flag",
|
GST_VIDEO_DECODER_ERROR (vtdec, 1, STREAM, DECODE,
|
||||||
frame->system_frame_number);
|
("Got frame %d with an error flag", frame->system_frame_number),
|
||||||
|
(NULL), ret);
|
||||||
gst_video_decoder_release_frame (decoder, frame);
|
gst_video_decoder_release_frame (decoder, frame);
|
||||||
ret = GST_FLOW_ERROR;
|
|
||||||
} else if (is_flushing || (frame->flags & VTDEC_FRAME_FLAG_SKIP)) {
|
} else if (is_flushing || (frame->flags & VTDEC_FRAME_FLAG_SKIP)) {
|
||||||
GST_LOG_OBJECT (vtdec, "flushing frame %d", frame->system_frame_number);
|
GST_LOG_OBJECT (vtdec, "flushing frame %d", frame->system_frame_number);
|
||||||
gst_video_decoder_release_frame (decoder, frame);
|
gst_video_decoder_release_frame (decoder, frame);
|
||||||
|
|
Loading…
Reference in a new issue