]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/dummy.c
Don't return negative session number
[vlc] / modules / stream_out / dummy.c
index 50ba6e1813126c17a325eae7600d14ef0b968e9c..d4ae94fc851e7f25150655600c764863e646a453 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * dummy.c: dummy stream output module
  *****************************************************************************
- * Copyright (C) 2003-2004 VideoLAN
- * $Id: dummy.c,v 1.4 2004/01/25 14:34:25 gbazin Exp $
+ * Copyright (C) 2003-2004 the VideoLAN team
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  *
  * 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, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
 
 #include <vlc/vlc.h>
-#include <vlc/sout.h>
+#include <vlc_block.h>
+#include <vlc_sout.h>
 
 /*****************************************************************************
  * Exported prototypes
@@ -38,7 +37,7 @@ static void     Close   ( vlc_object_t * );
 
 static sout_stream_id_t *Add ( sout_stream_t *, es_format_t * );
 static int               Del ( sout_stream_t *, sout_stream_id_t * );
-static int               Send( sout_stream_t *, sout_stream_id_t *, sout_buffer_t* );
+static int               Send( sout_stream_t *, sout_stream_id_t *, block_t* );
 
 /*****************************************************************************
  * Module descriptor
@@ -99,18 +98,9 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 }
 
 static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
-                 sout_buffer_t *p_buffer )
+                 block_t *p_buffer )
 {
-    sout_buffer_t *p_next;
-
-    while( p_buffer )
-    {
-        p_next = p_buffer->p_next;
-
-        sout_BufferDelete( p_stream->p_sout, p_buffer );
-        p_buffer = p_next;
-    }
-
+    block_ChainRelease( p_buffer );
     return VLC_SUCCESS;
 }