[libdvdnav-devel] dvd_input: always init dev->dvdcss
Thomas Guillem
git at videolan.org
Wed Jan 28 16:55:48 CET 2015
libdvdread | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 28 16:30:31 2015 +0100| [cd82f3072c75736dd0459738d12dbc0da0884f28] | committer: Jean-Baptiste Kempf
dvd_input: always init dev->dvdcss
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=cd82f3072c75736dd0459738d12dbc0da0884f28
---
src/dvd_input.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/dvd_input.c b/src/dvd_input.c
index 89ccec4..1832fde 100644
--- a/src/dvd_input.c
+++ b/src/dvd_input.c
@@ -99,10 +99,12 @@ static dvd_input_t css_open(const char *target,
if(target)
dev->dvdcss = DVDcss_open(target);
else if(stream && stream_cb) {
-#ifndef HAVE_DVDCSS_DVDCSS_H
- if (DVDcss_open_stream)
-#endif
+#ifdef HAVE_DVDCSS_DVDCSS_H
dev->dvdcss = DVDcss_open_stream(stream, (dvdcss_stream_cb *)stream_cb);
+#endif
+ dev->dvdcss = DVDcss_open_stream ?
+ DVDcss_open_stream(stream, (dvdcss_stream_cb *)stream_cb) :
+ NULL;
}
if(dev->dvdcss == 0) {
fprintf(stderr, "libdvdread: Could not open %s with libdvdcss.\n", target);
More information about the libdvdnav-devel
mailing list