]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: reader - fix the possible wrong ctrl variable usage
authorJaroslav Kysela <perex@perex.cz>
Thu, 5 Feb 2015 11:44:57 +0000 (12:44 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 5 Feb 2015 11:44:57 +0000 (12:44 +0100)
src/timeshift/timeshift_reader.c

index d83ec7fb68007547a39f9cc0e578f823a7d206d7..cd46140cd6affc96ceaae1c37b457eb9312f3602 100644 (file)
@@ -809,6 +809,7 @@ void *timeshift_reader ( void *p )
         cur_speed = 100;
         ctrl      = streaming_msg_create_code(SMT_SPEED, cur_speed);
         streaming_target_deliver2(ts->output, ctrl);
+        ctrl      = NULL;
 
         /* Flush timeshift buffer to live */
         if (_timeshift_flush_to_live(ts, &cur_file, &sm, &wait) == -1)
@@ -837,8 +838,8 @@ void *timeshift_reader ( void *p )
         pause_time = last_time;
         ctrl       = streaming_msg_create_code(SMT_SPEED, cur_speed);
         streaming_target_deliver2(ts->output, ctrl);
+        ctrl       = NULL;
       }
-      ctrl = NULL;
 
     /* Flush unwanted */
     } else if (ts->ondemand && cur_file) {