]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb: For full mux streaming, send more than one TS block in each packet
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 24 Oct 2012 10:34:18 +0000 (11:34 +0100)
committerAndreas Öman <andreas@lonelycoder.com>
Thu, 25 Oct 2012 11:06:05 +0000 (13:06 +0200)
src/dvb/dvb_adapter.c

index 7320db18ea273cc0f43012b4526a8460dac6ac96..49db8b34f612bff57c441210f24423e7085f659a 100644 (file)
@@ -854,23 +854,27 @@ dvb_adapter_input_dvr(void *aux)
 
     int wakeup_table_feed = 0;  // Just wanna wakeup once
 
+
     pthread_mutex_lock(&tda->tda_delivery_mutex);
+
+    if(LIST_FIRST(&tda->tda_streaming_pad.sp_targets) != NULL) {
+      streaming_message_t sm;
+      pktbuf_t *pb = pktbuf_alloc(tsb, r);
+      memset(&sm, 0, sizeof(sm));
+      sm.sm_type = SMT_MPEGTS;
+      sm.sm_data = pb;
+      streaming_pad_deliver(&tda->tda_streaming_pad, &sm);
+      pktbuf_ref_dec(pb);
+    }
+
+
+
     /* Process */
     while (r >= 188) {
   
       /* sync */
       if (tsb[i] == 0x47) {
 
-       if(LIST_FIRST(&tda->tda_streaming_pad.sp_targets) != NULL) {
-         streaming_message_t sm;
-         pktbuf_t *pb = pktbuf_alloc(tsb, 188);
-         memset(&sm, 0, sizeof(sm));
-         sm.sm_type = SMT_MPEGTS;
-         sm.sm_data = pb;
-         streaming_pad_deliver(&tda->tda_streaming_pad, &sm);
-         pktbuf_ref_dec(pb);
-       }
-
 
        if(!(tsb[i+1] & 0x80)) { // Only dispatch to table parser if not error
          int pid = (tsb[i+1] & 0x1f) << 8 | tsb[i+2];