summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2003-04-07 21:36:44 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2003-04-07 21:36:44 +0000
commite19d0af9ffc381e4e47da51c761d0f228b9ff2d6 (patch)
tree490cd82c254fc973d954335be37b90f1fcdd029b /src
parent0887fcc74b646906d1e43ab630f27a2f84d4ea10 (diff)
downloadxine-lib-e19d0af9ffc381e4e47da51c761d0f228b9ff2d6.tar.gz
xine-lib-e19d0af9ffc381e4e47da51c761d0f228b9ff2d6.tar.bz2
First step to stop the stream if it is encrypted. E.g. DVD with CSS, but not libdvdcss.
Still needs an event message to the user. CVS patchset: 4570 CVS date: 2003/04/07 21:36:44
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_mpeg_block.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index e988c528f..7167da289 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_mpeg_block.c,v 1.165 2003/04/06 13:43:46 mroi Exp $
+ * $Id: demux_mpeg_block.c,v 1.166 2003/04/07 21:36:44 jcdutton Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -445,12 +445,19 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
} else { /* mpeg 2 */
/* check PES scrambling_control */
- if (((p[6] & 0x30) != 0) && !this->warned) {
-
+ if (((p[6] & 0x30) != 0) ) {
+ printf("demux_mpeg_block:ENCRYPTED STREAM\n");
xine_log (this->stream->xine, XINE_LOG_MSG,
_("demux_mpeg_block: warning: pes header indicates that this stream may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
- this->warned = 1;
+ this->warned++;
+ if (this->warned > 5) {
+ xine_log (this->stream->xine, XINE_LOG_MSG,
+ _("demux_mpeg_block: too many errors, stopping playback. Maybe this stream is scrambled?\n"));
+ this->status = DEMUX_FINISHED;
+ /* FIXME: Put nice EVENT for user here */
+ }
+
}
if (p[7] & 0x80) { /* pts avail */