[dvblast-devel] [PATCH] Add support for ECM and EMM passthrough

Georgi Chorbadzhiyski gf at unixsol.org
Tue Jun 7 02:36:32 CEST 2011


On 6/6/11 10:27 PM, Georgi Chorbadzhiyski wrote:
> The attached patch adds support for two new options -M and -C
> that allow EMM and ECM pass through. The patch is against dvblast
> 1.2 because that is what I were using. I'll send patch against
> trunk tomorrow.

Apply the following fix on top of the previous patch. Without this
when program disappeared from PAT the ECM pids were not cleared.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
-------------- next part --------------
commit d5538d24fce6508269064063dd72687027597be6
Author: Georgi Chorbadzhiyski <gf at unixsol.org>
Date:   Tue Jun 7 03:32:30 2011 +0300

    Remove ECM pids when program is deleted

diff --git a/tags/1.2/demux.c b/tags/1.2/demux.c
index 3726ccc..5b5151d 100644
--- a/tags/1.2/demux.c
+++ b/tags/1.2/demux.c
@@ -1156,6 +1156,24 @@ static void DeleteProgram( dvbpsi_pat_program_t *p_program )
                      && p_pmt->i_pcr_pid != pp_sids[i_pmt]->i_pmt_pid )
                     UnselectPID( p_program->i_number, p_pmt->i_pcr_pid );
 
+                if ( b_enable_ecm )
+                {
+                    dvbpsi_descriptor_t *p_dr;
+                    dvbpsi_ca_dr_t *p_ca_dr;
+
+                    for( p_dr = p_pmt->p_first_descriptor; p_dr != NULL; p_dr = p_dr->p_next )
+                    {
+                        if ( p_dr->i_tag != CA_SYSTEM_DR )
+                            continue;
+
+                        p_ca_dr = dvbpsi_DecodeCADr( p_dr );
+                        if ( p_ca_dr )
+                        {
+                            UnselectPID( p_pmt->i_program_number, p_ca_dr->i_ca_pid );
+                        }
+                    }
+                }
+
                 for( p_es = p_pmt->p_first_es; p_es != NULL;
                      p_es = p_es->p_next )
                 {


More information about the dvblast-devel mailing list