v4l2: videodec: Only warn of incomplete drain on success

We may have hit an error, or just flushing in order to stop the thread,
in which case, not having drain everything is expected and not a
driver bug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
This commit is contained in:
Nicolas Dufresne 2023-04-17 16:07:21 -04:00 committed by GStreamer Marge Bot
parent 8e4dc89371
commit ba6f68d4c2

View file

@ -493,9 +493,11 @@ gst_v4l2_video_dec_finish (GstVideoDecoder * decoder)
counter++;
gst_video_decoder_drop_frame (decoder, frame);
}
g_warning
("%s: %i frames %u-%u left undrained after CMD_STOP, eos sent too early: bug in decoder -- please file a bug",
GST_ELEMENT_NAME (decoder), counter, first, last);
if (self->output_flow == GST_FLOW_OK) {
g_warning ("%s: %i frames %u-%u left undrained after CMD_STOP, "
"eos sent too early: bug in decoder -- please file a bug",
GST_ELEMENT_NAME (decoder), counter, first, last);
}
if (pending_frames)
g_list_free (pending_frames);
}