[dvblast-devel] Request new feature

Georgi Chorbadzhiyski gf at unixsol.org
Fri Feb 3 21:42:19 CET 2012


On 03.2.2012 г. 11:21, Kompan Kolia wrote:
> I would like to see a new feature.
>
> Switching the broadcast encrypted stream.
>
> If option is enable - Dvblast didn`t send scrambled stream to network
> If option is disable - Dvblast send scrambled stream
>
> Like VLC. If МДС can`t descramble stream, it does not send stream to network.
>
> This feature needed for monitor some channel.

If the stream is not descrambled the scrambling control bits are set to
encrypted. The simple hack bellow will get you more or less what you want
(even if decryption failed you'll still receive PSI tables). This feature
looks like a hack to me and personally I would not apply it without hearing
second opinion. Anyone?

diff --git a/demux.c b/demux.c
index ba90687..f1e0a4f 100644
--- a/demux.c
+++ b/demux.c
@@ -431,6 +431,11 @@ static void demux_Handle( block_t *p_ts )
                  {
                      p_output->i_nb_errors++;
                      p_output->i_last_error = i_wallclock;
+                    if ( p_output->i_nb_errors <= MAX_ERRORS )
+                    {
+                        block_Delete( p_ts );
+                        return;
+                    }
                  }
                  else if ( i_wallclock > p_output->i_last_error + WATCHDOG_WAIT )
                      p_output->i_nb_errors = 0;
@@ -445,6 +450,8 @@ static void demux_Handle( block_t *p_ts )
                               "too many errors for stream %s, resetting",
                               p_output->config.psz_displayname );
                      en50221_Reset();
+                    block_Delete( p_ts );
+                    return;
                  }
              }


-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


More information about the dvblast-devel mailing list