Skip to content

Commit

Permalink
本スレ情報を元に修正
Browse files Browse the repository at this point in the history
(ノンスクランブル放送を跨ぐと後続のスクランブル放送でECMを拾えなくなる問題)
  • Loading branch information
stz2012 committed May 12, 2016
1 parent c27e1f9 commit 09770e3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/arib_std_b25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,7 @@ static int proc_pmt(ARIB_STD_B25_PRIVATE_DATA *prv, TS_PROGRAM *pgrm)
DECRYPTOR_ELEM *dw;

TS_STREAM_ELEM *strm;
TS_STREAM_LIST tmp_old_strm;

r = 0;
dec[0] = NULL;
Expand Down Expand Up @@ -1412,13 +1413,8 @@ static int proc_pmt(ARIB_STD_B25_PRIVATE_DATA *prv, TS_PROGRAM *pgrm)
}
head += length;


/* unref old stream entries */
while( (strm = get_stream_list_head(&(pgrm->old_strm))) != NULL ){
unref_stream(prv, strm->pid);
memset(strm, 0, sizeof(TS_STREAM_ELEM));
put_stream_list_tail(&(prv->strm_pool), strm);
}
/* save old streams */
memcpy(&tmp_old_strm, &(pgrm->old_strm), sizeof(TS_STREAM_LIST));

/* save current streams */
memcpy(&(pgrm->old_strm), &(pgrm->streams), sizeof(TS_STREAM_LIST));
Expand All @@ -1432,6 +1428,13 @@ static int proc_pmt(ARIB_STD_B25_PRIVATE_DATA *prv, TS_PROGRAM *pgrm)
}
}

/* unref old stream entries */
while( (strm = get_stream_list_head(&tmp_old_strm)) != NULL ){
unref_stream(prv, strm->pid);
memset(strm, 0, sizeof(TS_STREAM_ELEM));
put_stream_list_tail(&(prv->strm_pool), strm);
}

while( head+4 < tail ){

type = head[0];
Expand Down

0 comments on commit 09770e3

Please sign in to comment.