mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +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/6446>
This commit is contained in:
parent
a5c437c643
commit
e5b5d223b4
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);
|
||||
|
||||
if (frame->flags & VTDEC_FRAME_FLAG_ERROR) {
|
||||
GST_LOG_OBJECT (vtdec, "ignoring frame %d because of error flag",
|
||||
frame->system_frame_number);
|
||||
GST_VIDEO_DECODER_ERROR (vtdec, 1, STREAM, DECODE,
|
||||
("Got frame %d with an error flag", frame->system_frame_number),
|
||||
(NULL), ret);
|
||||
gst_video_decoder_release_frame (decoder, frame);
|
||||
ret = GST_FLOW_ERROR;
|
||||
} else if (is_flushing || (frame->flags & VTDEC_FRAME_FLAG_SKIP)) {
|
||||
GST_LOG_OBJECT (vtdec, "flushing frame %d", frame->system_frame_number);
|
||||
gst_video_decoder_release_frame (decoder, frame);
|
||||
|
|
Loading…
Reference in a new issue