# HG changeset patch # User Kiyoshi Aman # Date 1190217837 18000 # Node ID b68bcc6a39c719ef0ffbf77088a766e1c6e934e9 # Parent 9e8f1056ccf93123b76ee27a5b1981b115315924# Parent dc83901850df571788476bd6486b804b665a99ae Automated merge with ssh://hg.atheme.org//hg/audacious-plugins diff -r 9e8f1056ccf9 -r b68bcc6a39c7 src/neon/neon.c --- a/src/neon/neon.c Wed Sep 19 10:25:26 2007 -0500 +++ b/src/neon/neon.c Wed Sep 19 11:03:57 2007 -0500 @@ -1,3 +1,22 @@ +/* + * A neon HTTP input plugin for Audacious + * Copyright (C) 2007 Ralf Ertzinger + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #include #include @@ -940,7 +959,7 @@ * The maximum number of bytes we can deliver is determined * by the number of bytes left until the next metadata announcement */ - belem = h->icy_metaleft / size; + belem = MIN(used_rb(&h->rb), h->icy_metaleft) / size; } else { belem = used_rb(&h->rb) / size; } diff -r 9e8f1056ccf9 -r b68bcc6a39c7 src/neon/neon.h --- a/src/neon/neon.h Wed Sep 19 10:25:26 2007 -0500 +++ b/src/neon/neon.h Wed Sep 19 11:03:57 2007 -0500 @@ -1,3 +1,22 @@ +/* + * A neon HTTP input plugin for Audacious + * Copyright (C) 2007 Ralf Ertzinger + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #ifndef _NEON_PLUGIN_H #define _NEON_PLUGIN_H diff -r 9e8f1056ccf9 -r b68bcc6a39c7 src/neon/rb.c --- a/src/neon/rb.c Wed Sep 19 10:25:26 2007 -0500 +++ b/src/neon/rb.c Wed Sep 19 11:03:57 2007 -0500 @@ -1,3 +1,19 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + /* * Ringbuffer implementation * diff -r 9e8f1056ccf9 -r b68bcc6a39c7 src/neon/rb.h --- a/src/neon/rb.h Wed Sep 19 10:25:26 2007 -0500 +++ b/src/neon/rb.h Wed Sep 19 11:03:57 2007 -0500 @@ -1,3 +1,19 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #ifndef _RB_H #define _RB_H