mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +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,
|
(GCompareDataFunc) gst_avi_demux_index_entry_search,
|
||||||
GST_SEARCH_MODE_BEFORE, &time, NULL);
|
GST_SEARCH_MODE_BEFORE, &time, NULL);
|
||||||
|
|
||||||
n = (entry - avi->index_entries) / sizeof (gst_avi_index_entry);
|
if (entry == NULL) {
|
||||||
while (entry->stream_nr != stream_nr && n > 0) {
|
entry = &avi->index_entries[0];
|
||||||
n--;
|
n = 0;
|
||||||
entry = &avi->index_entries[n];
|
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,
|
GST_LOG_OBJECT (avi,
|
||||||
|
|
Loading…
Reference in a new issue