From fcef9b7682c8682d512f56fdaa128c934c86864c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 5 Oct 2020 23:42:17 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=80=E3=83=97=E3=83=86=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=AE=E3=81=BF=E3=81=AE=E3=83=91=E3=82=B1=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AE=E3=82=B9=E3=82=AF=E3=83=A9=E3=83=B3=E3=83=96?= =?UTF-8?q?=E3=83=AB=E3=83=95=E3=83=A9=E3=82=B0=E3=81=AE=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BonDriver共有ツール総合 その2 http://peace.2ch.net/test/read.cgi/avi/1428405907/443-444n --- src/arib_std_b25.c | 84 +++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/src/arib_std_b25.c b/src/arib_std_b25.c index d06e898..0e969ff 100644 --- a/src/arib_std_b25.c +++ b/src/arib_std_b25.c @@ -612,29 +612,33 @@ static int flush_arib_std_b25(void *std_b25) n = 188 - 4; } - if( (crypt != 0) && - (hdr.adaptation_field_control & 0x01) ){ - - if(prv->map[pid].type == PID_MAP_TYPE_OTHER){ - dec = (DECRYPTOR_ELEM *)(prv->map[pid].target); - }else if( (prv->map[pid].type == 0) && - (prv->decrypt.count == 1) ){ - dec = prv->decrypt.head; - }else{ - dec = NULL; - } + if(crypt != 0){ + if(hdr.adaptation_field_control & 0x01){ - if( (dec != NULL) && (dec->m2 != NULL) ){ - m = dec->m2->decrypt(dec->m2, crypt, p, n); - if(m < 0){ - r = ARIB_STD_B25_ERROR_DECRYPT_FAILURE; - curr += unit; - goto LAST; + if(prv->map[pid].type == PID_MAP_TYPE_OTHER){ + dec = (DECRYPTOR_ELEM *)(prv->map[pid].target); + }else if( (prv->map[pid].type == 0) && + (prv->decrypt.count == 1) ){ + dec = prv->decrypt.head; + }else{ + dec = NULL; } + + if( (dec != NULL) && (dec->m2 != NULL) ){ + m = dec->m2->decrypt(dec->m2, crypt, p, n); + if(m < 0){ + r = ARIB_STD_B25_ERROR_DECRYPT_FAILURE; + curr += unit; + goto LAST; + } + curr[3] &= 0x3f; + prv->map[pid].normal_packet += 1; + }else{ + prv->map[pid].undecrypted += 1; + } + }else{ curr[3] &= 0x3f; prv->map[pid].normal_packet += 1; - }else{ - prv->map[pid].undecrypted += 1; } }else{ prv->map[pid].normal_packet += 1; @@ -2040,29 +2044,33 @@ static int proc_arib_std_b25(ARIB_STD_B25_PRIVATE_DATA *prv) n = 188 - 4; } - if( (crypt != 0) && - (hdr.adaptation_field_control & 0x01) ){ - - if(prv->map[pid].type == PID_MAP_TYPE_OTHER){ - dec = (DECRYPTOR_ELEM *)(prv->map[pid].target); - }else if( (prv->map[pid].type == 0) && - (prv->decrypt.count == 1) ){ - dec = prv->decrypt.head; - }else{ - dec = NULL; - } + if(crypt != 0){ + if(hdr.adaptation_field_control & 0x01){ - if( (dec != NULL) && (dec->m2 != NULL) ){ - m = dec->m2->decrypt(dec->m2, crypt, p, n); - if(m < 0){ - r = ARIB_STD_B25_ERROR_DECRYPT_FAILURE; - curr += unit; - goto LAST; + if(prv->map[pid].type == PID_MAP_TYPE_OTHER){ + dec = (DECRYPTOR_ELEM *)(prv->map[pid].target); + }else if( (prv->map[pid].type == 0) && + (prv->decrypt.count == 1) ){ + dec = prv->decrypt.head; + }else{ + dec = NULL; } + + if( (dec != NULL) && (dec->m2 != NULL) ){ + m = dec->m2->decrypt(dec->m2, crypt, p, n); + if(m < 0){ + r = ARIB_STD_B25_ERROR_DECRYPT_FAILURE; + curr += unit; + goto LAST; + } + curr[3] &= 0x3f; + prv->map[pid].normal_packet += 1; + }else{ + prv->map[pid].undecrypted += 1; + } + }else{ curr[3] &= 0x3f; prv->map[pid].normal_packet += 1; - }else{ - prv->map[pid].undecrypted += 1; } }else{ prv->map[pid].normal_packet += 1;