]> git.sesse.net Git - vlc/blobdiff - src/stream_output/stream_output.c
Merge branch '1.0-bugfix'
[vlc] / src / stream_output / stream_output.c
index 3f81d264381c05b4c2f66d0970329169076508ab..a6672dede5784847466da56805d9bda44a0beec1 100644 (file)
 
 #include <vlc_meta.h>
 #include <vlc_block.h>
+#include <vlc_codec.h>
 
 #include "input/input_interface.h"
 
+#define VLC_CODEC_NULL VLC_FOURCC( 'n', 'u', 'l', 'l' )
+
 #undef DEBUG_BUFFER
 /*****************************************************************************
  * Local prototypes
@@ -210,7 +213,7 @@ sout_packetizer_input_t *sout_InputNew( sout_instance_t *p_sout,
 
     msg_Dbg( p_sout, "adding a new sout input (sout_input:%p)", p_input );
 
-    if( p_fmt->i_codec == VLC_FOURCC( 'n', 'u', 'l', 'l' ) )
+    if( p_fmt->i_codec == VLC_CODEC_NULL )
     {
         vlc_object_release( p_sout );
         return p_input;
@@ -239,7 +242,7 @@ int sout_InputDelete( sout_packetizer_input_t *p_input )
 
     msg_Dbg( p_sout, "removing a sout input (sout_input:%p)", p_input );
 
-    if( p_input->p_fmt->i_codec != VLC_FOURCC( 'n', 'u', 'l', 'l' ) )
+    if( p_input->p_fmt->i_codec != VLC_CODEC_NULL )
     {
         vlc_mutex_lock( &p_sout->lock );
         p_sout->p_stream->pf_del( p_sout->p_stream, p_input->id );
@@ -260,7 +263,7 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
     sout_instance_t     *p_sout = p_input->p_sout;
     int                 i_ret;
 
-    if( p_input->p_fmt->i_codec == VLC_FOURCC( 'n', 'u', 'l', 'l' ) )
+    if( p_input->p_fmt->i_codec == VLC_CODEC_NULL )
     {
         block_Release( p_buffer );
         return VLC_SUCCESS;
@@ -874,3 +877,11 @@ rtp:
     mrl_Clean( &mrl );
     return psz_chain;
 }
+
+#undef sout_EncoderCreate
+encoder_t *sout_EncoderCreate( vlc_object_t *p_this )
+{
+    static const char type[] = "encoder";
+    return vlc_custom_create( p_this, sizeof( encoder_t ), VLC_OBJECT_GENERIC,
+                              type );
+}