]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
transcode: handle packets with the NULL payload
authorJaroslav Kysela <perex@perex.cz>
Tue, 10 Feb 2015 17:24:08 +0000 (18:24 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 Feb 2015 17:24:08 +0000 (18:24 +0100)
src/plumbing/transcoding.c

index f017437ac0cf1fce7f01dee7be5c409cec717662..4aeafabcd674e4baff696dec7b14f6bf765f7267 100644 (file)
@@ -1252,11 +1252,18 @@ static void
 transcoder_packet(transcoder_t *t, th_pkt_t *pkt)
 {
   transcoder_stream_t *ts;
+  streaming_message_t *sm;
 
   LIST_FOREACH(ts, &t->t_stream_list, ts_link) {
     if (pkt->pkt_componentindex == ts->ts_index) {
-      ts->ts_handle_pkt(t, ts, pkt);
-      return;
+      if (pkt->pkt_payload) {
+        ts->ts_handle_pkt(t, ts, pkt);
+        return;
+      } else {
+        sm = streaming_msg_create_pkt(pkt);
+        streaming_target_deliver2(ts->ts_target, sm);
+        pkt_ref_dec(pkt);
+      }
     }
   }
   pkt_ref_dec(pkt);