Browse Source

mptsd can remux when pmt table changed

wing_pn 7 years ago
parent
commit
aa1338083a
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      input.c

+ 5
- 3
input.c View File

185
 	
185
 	
186
 	if (s->last_pat->initialized) {
186
 	if (s->last_pat->initialized) {
187
 		if (!ts_pat_is_same(s->pat, s->last_pat)) {
187
 		if (!ts_pat_is_same(s->pat, s->last_pat)) {
188
-			proxy_log(r, "PAT changed.");
188
+			proxy_log(r, "========================PAT changed.========================");
189
 			return -1; // Reconnect
189
 			return -1; // Reconnect
190
 		}
190
 		}
191
 		ts_pat_free(&s->last_pat);
191
 		ts_pat_free(&s->last_pat);
243
 
243
 
244
 	s->pmt = ts_pmt_push_packet(s->pmt, ts_packet);
244
 	s->pmt = ts_pmt_push_packet(s->pmt, ts_packet);
245
 
245
 
246
-	s->last_pmt = ts_pmt_push_packet(s->last_pmt, ts_packet);
246
+	
247
 	if (s->last_pmt->initialized) {
247
 	if (s->last_pmt->initialized) {
248
 		if (!ts_pmt_is_same(s->pmt, s->last_pmt)) {
248
 		if (!ts_pmt_is_same(s->pmt, s->last_pmt)) {
249
-			proxy_log(r, "PMT changed.");
249
+			proxy_log(r, "========================PMT changed.========================");
250
 			return -2; // Reconnect
250
 			return -2; // Reconnect
251
 		}
251
 		}
252
 		ts_pmt_free(&s->last_pmt);
252
 		ts_pmt_free(&s->last_pmt);
253
 		s->last_pmt = ts_pmt_alloc();
253
 		s->last_pmt = ts_pmt_alloc();
254
 	}
254
 	}
255
 
255
 
256
+    s->last_pmt = ts_pmt_push_packet(s->last_pmt, ts_packet);
257
+
256
 	if (s->pmt->initialized) {
258
 	if (s->pmt->initialized) {
257
 		if (!s->pmt_rewritten || !s->pmt_rewritten->initialized) {
259
 		if (!s->pmt_rewritten || !s->pmt_rewritten->initialized) {
258
 			input_rewrite_pmt(r);
260
 			input_rewrite_pmt(r);

Loading…
Cancel
Save