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/4437>
This commit is contained in:
Nicolas Dufresne 2023-04-17 16:07:21 -04:00
parent 4dded20929
commit fca61fad4d

View file

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