that fish is unlocked

This commit is contained in:
Erica Z 2024-10-12 17:15:40 +00:00
parent bc8da35381
commit 770b76e882

View file

@ -89,13 +89,14 @@ class Playbin : Object {
string? next_uri = null; string? next_uri = null;
this.next_uri_lock.lock (); this.next_uri_lock.lock ();
if (this.next_uri != this.next_uri_locked_in) { if (this.next_uri != (string) this.playbin.current_uri) {
print("%s\n", this.next_uri);
print("%s\n", (string) this.playbin.current_uri);
// WHOOPS! didn't actually switch to the track the play queue wanted // WHOOPS! didn't actually switch to the track the play queue wanted
// FIXME as it arises // FIXME as it arises
assert (false); assert (false);
} }
this.next_uri = null; this.next_uri = null;
this.next_uri_locked_in = null;
this.next_uri_lock.unlock (); this.next_uri_lock.unlock ();
this.stream_started (); this.stream_started ();
@ -175,7 +176,6 @@ class Playbin : Object {
// pretend this track was locked in by about-to-finish before // pretend this track was locked in by about-to-finish before
this.next_uri_lock.lock (); this.next_uri_lock.lock ();
this.next_uri = uri; this.next_uri = uri;
this.next_uri_locked_in = uri;
this.next_uri_lock.unlock (); this.next_uri_lock.unlock ();
yield this.set_state (Gst.State.READY); yield this.set_state (Gst.State.READY);
@ -193,7 +193,6 @@ class Playbin : Object {
Mutex next_uri_lock; Mutex next_uri_lock;
string? next_uri; string? next_uri;
string? next_uri_locked_in;
public void set_next_uri (string? next_uri) { public void set_next_uri (string? next_uri) {
this.next_uri_lock.lock (); this.next_uri_lock.lock ();
@ -206,7 +205,6 @@ class Playbin : Object {
private void on_about_to_finish (dynamic Gst.Element playbin) { private void on_about_to_finish (dynamic Gst.Element playbin) {
this.next_uri_lock.lock (); this.next_uri_lock.lock ();
string? next_uri = this.next_uri; string? next_uri = this.next_uri;
this.next_uri_locked_in = next_uri;
this.next_uri_lock.unlock (); this.next_uri_lock.unlock ();
if (next_uri != null) { if (next_uri != null) {