]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: send status before each packet in keyframe_mode
authorJaroslav Kysela <perex@perex.cz>
Mon, 4 Jan 2016 17:16:31 +0000 (18:16 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 4 Jan 2016 17:16:35 +0000 (18:16 +0100)
- this makes rewind and fast-forward updates in kodi more interactive

src/timeshift/timeshift_reader.c

index 259cbb23fa566cf5056894bbdf4a77c26c3616a7..940095133a3bbc077442ccc3dd96013250f8d681 100644 (file)
@@ -829,8 +829,10 @@ void *timeshift_reader ( void *p )
         tvhlog(LOG_DEBUG, "timeshift", "ts %d skip failed (%d)", ts->id, sm ? sm->sm_type : -1);
       }
       streaming_target_deliver2(ts->output, ctrl);
-      ctrl = NULL;
+    } else {
+      streaming_msg_free(ctrl);
     }
+    ctrl = NULL;
 
     /* Deliver */
     if (sm && (skip ||
@@ -838,6 +840,8 @@ void *timeshift_reader ( void *p )
                 ((cur_speed > 0) && (sm->sm_time <= deliver))))) {
 
       last_time = sm->sm_time;
+      if (!skip && keyframe_mode) /* always send status on keyframe mode */
+        timeshift_status(ts, last_time);
       timeshift_packet_log("out", ts, sm);
       streaming_target_deliver2(ts->output, sm);
       sm        = NULL;