mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 14:31:06 +00:00
net/aws: fix sanity check in transcribe loop
When we receive a new alternative we want to avoid iterating out of bounds, but the comparison between the current index and the length of the alternative should not log an error when partial_index == length, as Vec::drain(length..) is valid, and it is completely valid for AWS to send us a new alternative with as many items as we have already dequeued. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1751>
This commit is contained in:
parent
7e912b0dde
commit
66727188cf
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ impl TranscriberStream {
|
|||
mut items: Vec<types::Item>,
|
||||
partial: bool,
|
||||
) -> Option<Vec<TranscriptItem>> {
|
||||
if items.len() <= self.partial_index {
|
||||
if items.len() < self.partial_index {
|
||||
gst::error!(
|
||||
CAT,
|
||||
imp = self.imp,
|
||||
|
|
Loading…
Reference in a new issue