mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
dvdreadsrc: correctly set next cell when seeking to sector
This commit is contained in:
parent
5c0e0dd598
commit
f4248f002a
1 changed files with 4 additions and 4 deletions
|
@ -1622,16 +1622,16 @@ gst_dvd_read_src_goto_sector (GstDvdReadSrc * src, int angle)
|
||||||
gint first = src->cur_pgc->cell_playback[cur].first_sector;
|
gint first = src->cur_pgc->cell_playback[cur].first_sector;
|
||||||
gint last = src->cur_pgc->cell_playback[cur].last_sector;
|
gint last = src->cur_pgc->cell_playback[cur].last_sector;
|
||||||
GST_DEBUG_OBJECT (src, "Cell %d sector bounds: %d %d", cur, first, last);
|
GST_DEBUG_OBJECT (src, "Cell %d sector bounds: %d %d", cur, first, last);
|
||||||
|
cur = next;
|
||||||
|
if (src->cur_pgc->cell_playback[cur].block_type == BLOCK_TYPE_ANGLE_BLOCK)
|
||||||
|
cur += angle;
|
||||||
|
next = gst_dvd_read_src_get_next_cell (src, src->cur_pgc, cur);
|
||||||
/* seeking to 0 should end up at first chapter in any case */
|
/* seeking to 0 should end up at first chapter in any case */
|
||||||
if ((seek_to >= first && seek_to <= last) || (seek_to == 0 && i == 0)) {
|
if ((seek_to >= first && seek_to <= last) || (seek_to == 0 && i == 0)) {
|
||||||
GST_DEBUG_OBJECT (src, "Seek target found in chapter %d", i);
|
GST_DEBUG_OBJECT (src, "Seek target found in chapter %d", i);
|
||||||
chapter = i;
|
chapter = i;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
cur = next;
|
|
||||||
if (src->cur_pgc->cell_playback[cur].block_type == BLOCK_TYPE_ANGLE_BLOCK)
|
|
||||||
cur += angle;
|
|
||||||
next = gst_dvd_read_src_get_next_cell (src, src->cur_pgc, cur);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue