From 48c5bf28df8a317eb3140a2630f86534ed7b9536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Wed, 9 Jan 2008 10:46:06 +0000 Subject: [PATCH] only drop from video --- tsmux.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tsmux.c b/tsmux.c index 4d174a20..2125baab 100644 --- a/tsmux.c +++ b/tsmux.c @@ -375,8 +375,11 @@ ts_mux_packet(th_muxer_t *tm, int64_t pcr, uint8_t *outbuf, int maxblocks) /* Periodic drop (for testing purposes) */ - if(i != 0 && i != maxblocks - 1 && - tm->tm_drop_rate && ++tm->tm_drop_cnt == tm->tm_drop_rate) { + if(tm->tm_drop_rate && i != 0 && i != maxblocks - 1 && + tms->tms_stream && + (tms->tms_stream->st_type == HTSTV_H264 || + tms->tms_stream->st_type == HTSTV_MPEG2VIDEO) && + ++tm->tm_drop_cnt == tm->tm_drop_rate) { tm->tm_drop_cnt = 0; i--; } else {