warn on failed seek
This commit is contained in:
parent
26449b9dcf
commit
d2025102e6
1 changed files with 6 additions and 2 deletions
|
@ -182,8 +182,12 @@ public class Playbin : GLib.Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void seek (double position) {
|
public void seek (double position) {
|
||||||
this.position = position;
|
var rc = this.mpv.command ({"seek", position.to_string (), "absolute"});
|
||||||
assert (this.mpv.command ({"seek", position.to_string (), "absolute"}) >= 0);
|
if (rc < 0) {
|
||||||
|
warning (@"could not seek to $position: $rc");
|
||||||
|
} else {
|
||||||
|
this.position = position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// manually changes which track in the play queue to play
|
// manually changes which track in the play queue to play
|
||||||
|
|
Loading…
Reference in a new issue