comparison recpt1/tssplitter_lite.c @ 101:3f7288b0672c

fix calculation for continuity counter
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 14 Feb 2010 22:12:10 +0900
parents aeba1988234f
children afd25d9ebef6
comparison
equal deleted inserted replaced
100:aeba1988234f 101:3f7288b0672c
210 unsigned char **pat, // [out] PAT 情報(再構築後) 210 unsigned char **pat, // [out] PAT 情報(再構築後)
211 unsigned char* pids, // [out] 出力対象 PID 情報 211 unsigned char* pids, // [out] 出力対象 PID 情報
212 char** sid_list, // [in] 出力対象サービス ID のリスト 212 char** sid_list, // [in] 出力対象サービス ID のリスト
213 unsigned char* pmt_pids, // [in] 出力対象PIDのPMT PID 213 unsigned char* pmt_pids, // [in] 出力対象PIDのPMT PID
214 , // [in] pt1_drvの入力TS 214 , // [in] pt1_drvの入力TS
215 int* pmt_retain, // [in] PMTの落とすべき数 215 int* pmt_retain, // [in] 残すべきPMTの数
216 int* pmt_counter // [out] PMTの落とした数 216 int* pmt_counter // [out] 残したPMTの数
217 #endif 217 #endif
218 218
219 int length = sbuf->size; 219 int length = sbuf->size;
220 int pid; 220 int pid;
221 int result = TSS_ERROR; 221 int result = TSS_ERROR;
290 // 巡回カウンタカウントアップ 290 // 巡回カウンタカウントアップ
291 if(0xFF == splitter->pat_count) { 291 if(0xFF == splitter->pat_count) {
292 splitter->pat_count = splitter->pat[3]; 292 splitter->pat_count = splitter->pat[3];
293 } 293 }
294 else { 294 else {
295 splitter->pat_count = (splitter->pat_count + 1) % 16; 295 splitter->pat_count += 1;
296 if(0 == splitter->pat_count % 0x10) {
297 splitter->pat_count -= 0x10;
298 }
296 } 299 }
297 splitter->pat[3] = splitter->pat_count; 300 splitter->pat[3] = splitter->pat_count;
298 301
299 memcpy(dptr + d_offset, splitter->pat, LENGTH_PACKET); 302 memcpy(dptr + d_offset, splitter->pat, LENGTH_PACKET);
300 d_offset += LENGTH_PACKET; 303 d_offset += LENGTH_PACKET;