summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorlgb <lgb@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-17 22:04:44 +0000
committerlgb <lgb@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-17 22:04:44 +0000
commit247b44e482927b578d26fd0b75b89ef8fc383ec2 (patch)
treecc979d90c402ddb2b2a90c0b9a2ef35a599767c7 /mplayer.c
parente35f1762a1d34472259cb3e9d62d4b426e1d1211 (diff)
downloadmpv-247b44e482927b578d26fd0b75b89ef8fc383ec2.tar.bz2
mpv-247b44e482927b578d26fd0b75b89ef8fc383ec2.tar.xz
preliminary DVD support using libcss
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@493 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index f637157ec9..023c210a54 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -50,6 +50,8 @@
#include "codec-cfg.h"
+#include "dvdauth.h"
+
#ifdef USE_DIRECTSHOW
#include "DirectShow/DS_VideoDec.h"
#include "DirectShow/DS_AudioDec.h"
@@ -605,6 +607,12 @@ if(vcd_track){
//============ Open plain FILE ============
f=open(filename,O_RDONLY);
if(f<0){ printf("File not found: '%s'\n",filename);return 1; }
+#ifdef HAVE_LIBCSS
+ if (dvd_device) {
+ if (dvd_auth(dvd_device,f)) exit(0);
+ printf("DVD auth sequence seems to be OK.\n");
+ }
+#endif
stream_type=STREAMTYPE_FILE;
}
@@ -1900,6 +1908,9 @@ switch(file_format){
// picture->bitrate=2324*75*8; // standard VCD bitrate (75 sectors / sec)
if(newpos<seek_to_byte) newpos=seek_to_byte;
+#ifdef HAVE_LIBCSS
+ if (dvd_device) newpos&=~(STREAM_BUFFER_SIZE-1); /* sector boundary */
+#endif
stream_seek(demuxer->stream,newpos);
// re-sync video:
videobuf_code_len=0; // reset ES stream buffer