]> git.sesse.net Git - vlc/blobdiff - src/input/stream_demux.c
win32: remove non-standard empty struct
[vlc] / src / input / stream_demux.c
index b090219a479d35c3f7653681bfcbf106b594bfab..9bf33437dd5ca0f3e46426f5284c893a23c1ec71 100644 (file)
@@ -200,7 +200,7 @@ static int DStreamRead( stream_t *s, void *p_read, unsigned int i_read )
             i_copy = __MIN( i_read, p_block->i_buffer );
             if( p_out && i_copy ) memcpy( p_out, p_block->p_buffer, i_copy );
             i_read -= i_copy;
-            p_out += i_copy;
+            if ( p_out ) p_out += i_copy;
             i_out += i_copy;
             p_block->i_buffer -= i_copy;
             p_block->p_buffer += i_copy;
@@ -259,7 +259,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
 {
     stream_sys_t *p_sys = s->p_sys;
     uint64_t    *p_i64;
-    bool *p_b;
 
     switch( i_query )
     {
@@ -269,13 +268,10 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case STREAM_CAN_SEEK:
-            p_b = (bool*) va_arg( args, bool * );
-            *p_b = false;
-            return VLC_SUCCESS;
-
         case STREAM_CAN_FASTSEEK:
-            p_b = (bool*) va_arg( args, bool * );
-            *p_b = false;
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
+            *va_arg( args, bool * ) = false;
             return VLC_SUCCESS;
 
         case STREAM_GET_POSITION:
@@ -300,9 +296,23 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case STREAM_CONTROL_ACCESS:
+        case STREAM_GET_PTS_DELAY:
+            *va_arg( args, int64_t * ) = DEFAULT_PTS_DELAY;
+            return VLC_SUCCESS;
+
+        case STREAM_GET_TITLE_INFO:
+        case STREAM_GET_TITLE:
+        case STREAM_GET_SEEKPOINT:
+        case STREAM_GET_META:
         case STREAM_GET_CONTENT_TYPE:
+        case STREAM_GET_SIGNAL:
+        case STREAM_SET_PAUSE_STATE:
+        case STREAM_SET_TITLE:
+        case STREAM_SET_SEEKPOINT:
         case STREAM_SET_RECORD_STATE:
+        case STREAM_SET_PRIVATE_ID_STATE:
+        case STREAM_SET_PRIVATE_ID_CA:
+        case STREAM_GET_PRIVATE_ID_STATE:
             return VLC_EGENERIC;
 
         default:
@@ -357,6 +367,9 @@ static void* DStreamThread( void *obj )
             break;
     }
 
+    /* Explicit kludge: the stream is destroyed by the owner of the
+     * streamDemux, not here. */
+    p_demux->s = NULL;
     demux_Delete( p_demux );
 
     return NULL;