Commit 4e01e311 authored by Simon Morlat's avatar Simon Morlat

fix inconsistency of state when MS_PLAYER_EOF is raised.

parent 375b7f3c
......@@ -376,22 +376,18 @@ static void player_process(MSFilter *f){
ms_queue_put(f->outputs[0],om);
}else freemsg(om);
if (err<bytes){
ms_filter_notify_no_arg(f,MS_PLAYER_EOF);
/*for compatibility:*/
ms_filter_notify_no_arg(f,MS_FILE_PLAYER_EOF);
lseek(d->fd,d->hsize,SEEK_SET);
/* special value for playing file only once */
if (d->loop_after<0)
{
if (d->loop_after<0){
d->state=MSPlayerPaused;
ms_filter_unlock(f);
return;
}
if (d->loop_after>=0){
}else if (d->loop_after>=0){
d->pause_time=d->loop_after;
}
ms_filter_notify_no_arg(f,MS_PLAYER_EOF);
/*for compatibility:*/
ms_filter_notify_no_arg(f,MS_FILE_PLAYER_EOF);
}
}else{
ms_warning("Fail to read %i bytes: %s",bytes,strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment