From: Dan Dennedy Date: Fri, 3 Jun 2011 05:07:52 +0000 (-0700) Subject: Prevent continious UGET for eof attribute. X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=8abeb6c8e20cb942513fa422d772550615610ee8;p=rugen Prevent continious UGET for eof attribute. Patch from Maksym Veremeyenko. --- diff --git a/src/dv1394app.c b/src/dv1394app.c index 995539a..d367235 100644 --- a/src/dv1394app.c +++ b/src/dv1394app.c @@ -244,10 +244,12 @@ static gboolean on_transport_pressed( GtkWidget *button, gpointer data ) case 11: mvcp_unit_set( dv, unit, "eof", "loop"); + this->eof = 0; break; case 12: mvcp_unit_set( dv, unit, "eof", "pause"); + this->eof = 0; break; default: diff --git a/src/page_status.c b/src/page_status.c index 6ea5661..bd8bd84 100644 --- a/src/page_status.c +++ b/src/page_status.c @@ -214,13 +214,15 @@ static void *status_thread( void *arg ) char buf[32]; if ( status.status == unit_disconnected ) + { + this->app->eof = 0; break; + } if ( show_status( this, &status ) ) show_units( this, TRUE ); - if ( mvcp_unit_get( this->app->command, this->app->selected_unit, "eof", buf, sizeof(buf) ) != -1) - this->app->eof = buf[0]; - else - this->app->eof = 0; + if ( !this->app->eof && mvcp_unit_get( this->app->command, this->app->selected_unit, + "eof", buf, sizeof(buf) ) != -1) + this->app->eof = buf[0]; } }