]> git.sesse.net Git - vlc/commitdiff
Fixed missing unlock in case of error (timeshift).
authorLaurent Aimar <fenrir@videolan.org>
Mon, 17 Nov 2008 18:34:24 +0000 (19:34 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 17 Nov 2008 19:03:28 +0000 (20:03 +0100)
src/input/es_out_timeshift.c

index 9d0bf8388875ef26b20433acfb1ffe328a6f43e6..74f9420aa46c07d335ce38e3cdfaf23fb3fc1da6 100644 (file)
@@ -59,8 +59,6 @@ enum
     C_SEND,
     C_DEL,
     C_CONTROL,
-
-    C_MAX
 };
 
 typedef struct
@@ -764,6 +762,8 @@ static void TsPushCmd( ts_thread_t *p_ts, ts_cmd_t *p_cmd )
         if( !p_storage )
         {
             CmdClean( p_cmd );
+            vlc_mutex_unlock( &p_ts->lock );
+            /* TODO warn the user (but only once) */
             return;
         }
 
@@ -779,6 +779,7 @@ static void TsPushCmd( ts_thread_t *p_ts, ts_cmd_t *p_cmd )
         }
     }
 
+    /* TODO return error and warn the user (but only once) */
     TsStoragePushCmd( p_ts->p_storage_w, p_cmd, p_ts->p_storage_r == p_ts->p_storage_w );
 
     vlc_cond_signal( &p_ts->wait );
@@ -1143,7 +1144,7 @@ static void TsStoragePopCmd( ts_storage_t *p_storage, ts_cmd_t *p_cmd )
         }
         else
         {
-            fprintf( stderr, "----------------- 2: %m\n" );
+            //fprintf( stderr, "TsStoragePopCmd: %m\n" );
             p_cmd->send.p_block = block_Alloc( 1 );
         }
     }