mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
avidemux: Use the first entry for a given stream if the first entry is after the seek position
This commit is contained in:
parent
97fa58f397
commit
a62ed3b153
1 changed files with 13 additions and 4 deletions
|
@ -362,10 +362,19 @@ gst_avi_demux_index_entry_for_time (GstAviDemux * avi,
|
|||
(GCompareDataFunc) gst_avi_demux_index_entry_search,
|
||||
GST_SEARCH_MODE_BEFORE, &time, NULL);
|
||||
|
||||
n = (entry - avi->index_entries) / sizeof (gst_avi_index_entry);
|
||||
while (entry->stream_nr != stream_nr && n > 0) {
|
||||
n--;
|
||||
entry = &avi->index_entries[n];
|
||||
if (entry == NULL) {
|
||||
entry = &avi->index_entries[0];
|
||||
n = 0;
|
||||
while (entry->stream_nr != stream_nr && n < avi->index_size - 1) {
|
||||
n++;
|
||||
entry = &avi->index_entries[n];
|
||||
}
|
||||
} else if (entry->stream_nr != stream_nr) {
|
||||
n = (entry - avi->index_entries) / sizeof (gst_avi_index_entry);
|
||||
while (entry->stream_nr != stream_nr && n > 0) {
|
||||
n--;
|
||||
entry = &avi->index_entries[n];
|
||||
}
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (avi,
|
||||
|
|
Loading…
Reference in a new issue