vss: Let the transport specify whether periodic headers are necessary.
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index 96b2ba9..8c16c95 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -227,8 +227,12 @@ static bool need_audio_header(struct fec_client *fc, struct vss_task *vsst)
                return false;
        if (vsst->header_len == 0)
                return false;
-       if (fc->group.num && tv_diff(&fc->next_header_time, now, NULL) > 0)
-               return false;
+       if (fc->group.num > 0) {
+               if (!fc->fcp->need_periodic_header)
+                       return false;
+               if (tv_diff(&fc->next_header_time, now, NULL) > 0)
+                       return false;
+       }
        tv_add(now, &vsst->header_interval, &fc->next_header_time);
        return true;
 }