Commit e50991af authored by Reinhard Tartler's avatar Reinhard Tartler

Imported Upstream version 5.0.0

parent 01f7ff3a
commit 8999b92630c46435f96bbaad564a2aaf211b2ce9
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Thu Jul 31 03:44:30 2014 +0200
Do not hardcode Tag Identifier
commit 64dfc537f4c2a5f46d1673299c92d95e7f49257b
Author: Diego Biurrun <diego@biurrun.de>
Date: Thu Jul 31 23:39:12 2014 +0200
build: Remove ChangeLog only on maintainer-clean, not distclean
The file is automatically generated with Git, so in a distribution
tarball without Git metadata it cannot be regenerated once deleted.
commit 4018b958d1d88c5ad486aca95b0fe1804eadbb98
Author: Diego Biurrun <diego@biurrun.de>
Date: Thu Jul 31 23:37:59 2014 +0200
Ignore generated 'compile' Automake helper program and release tarballs
commit 839feb210301366fced3be9afa3fde4703339bc1
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed Jul 30 22:27:51 2014 +0200
Increase the version in the dvd_reader.h header
See Debian #532438
commit f64e1aedae8f746b97037e41f4adc7c78bda9fa5
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Sun Jul 27 01:27:28 2014 +0200
Add -Wextra compilation flags
commit a3a050adae15fe6585d4d2b9a5213e31d360081f
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Sun Jul 13 03:42:38 2014 +0200
On the road to 5.0.0
commit a7cedb037147234e3dec1d75add729fdf98f84bb
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Sun Jul 13 01:54:08 2014 +0200
Update NEWS for 5.0.0
commit 7c6206accb4f039d9171765f239afc48557e455f
Author: Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date: Wed Jun 11 12:16:26 2014 +0200
put changes present in 4.2.1 release in the NEWS file
commit 59332a29770e0bbc4a8b02dfb0b9304fb50551a4
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Thu Jun 5 20:28:14 2014 +0200
Support Android
I will not comment more on the stupidity of bionic...
commit 75f8601ee3b19d8914528860f7e1d2906df4a411
Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat May 17 10:26:00 2014 +0200
configure: fix build on NIOS II platform
NIOS II is a CPU architecture from Altera, which uses 'nios2' as the
architecture part of the tuple. Unfortunately, 'nios2' matches the
current '*os2*' test done by libdvdread's configure script to detect
the OS/2 operating system. This leads to build issues as the build
process of libdvdread then tries to use OS/2 specific compiler
options, that do not exist in the gcc used for Linux/NIOS2.
To fix this, this patch makes the test for OS/2 a little bit more
specific: in the case of the OS/2 operating system, the OS part of the
tuple contains just 'os2' (confirmed by looking at config.guess and
config.sub in the gnuconfig project). So using '*-os2-*' will properly
match the OS/2 operating system but not the NIOS II architecture.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit 6733be216f17c75af74e61f0e4e1083492684796
Author: Steve Dibb <beandog@gentoo.org>
Date: Thu May 15 19:20:59 2014 -0600
Clean up order of variables, display of output.
Remove redundant check for video_attr.
Rearrange checks for attributes to match same order as declarations.
Move video unknown string to last displayed, similar to audio output, and use same naming scheme.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit d59e891d05c0acda388061645cc033837a92a586
Author: Steve Dibb <beandog@gentoo.org>
Date: Thu May 15 11:58:08 2014 -0600
Remain consistent with earlier code in function
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit 15a8100907c0172b6c4f5b47a8264a6bc94432fe
Author: Steve Dibb <beandog@gentoo.org>
Date: Tue May 13 09:46:52 2014 -0600
Remove unused 'level' parameter
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit cff267d99196c719017ab4d229eecea35e3e0cd1
Author: Steve Dibb <beandog@gentoo.org>
Date: Tue May 13 09:46:51 2014 -0600
An IFO without a VTS TMAP is very common, remove warning
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit c3f1a56caa4f876ed3753935d95d93292cfd5ed7
Author: Steve Dibb <beandog@gentoo.org>
Date: Wed May 7 13:09:15 2014 -0600
libdvdread: src/ifo_read.c Fix off-by-one error on displaying IFO filename
Fixes incorrect warning:
libdvdread: Invalid IFO for title 2 (VTS_02_0.BU).
to:
libdvdread: Invalid IFO for title 2 (VTS_02_0.BUP).
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit 0cd997af4474b5026308195ecfb33a6016a9e7fb
Author: Steve Dibb <beandog@gentoo.org>
Date: Thu Apr 24 16:42:21 2014 +0200
Fix crash in ifoRead_VTS_PTT_SRPT()
In ifoRead_VTS_PTT_SRPT(), there's a lot of places where the
function will exit on a 'goto fail' call if the IFO is invalid.
However, the check for the PGN value is only done later.
This fixes it so that it fails earlier -- when the PGN is
originally set, and doesn't go through the other checks as well, trying to set
invalid data that will be referenced later.
See VLC trac #10459
commit 0538a5dbecc917c409c7ec62a7ff32b02ba1eb73
Author: Steve Dibb <beandog@gentoo.org>
Date: Tue Apr 15 13:28:33 2014 -0600
libdvdread: remove unused variables; cleanup return syntax
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit d65889e7ba84799c3155006a7be7ee6a218288fc
Author: KO Myung-Hun <komh78@gmail.com>
Date: Thu Apr 10 22:57:04 2014 +0900
src/dvd_read.c: fix a compilation warning on OS/2
-----
src/dvd_reader.c: In function `DVDOpen':
src/dvd_reader.c:561: warning: implicit declaration of function `isalpha'
-----
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit 9818650809d02ed9603686232ade3537234e74e8
Author: KO Myung-Hun <komh78@gmail.com>
Date: Thu Apr 10 22:57:03 2014 +0900
configure: add additional flags to LDFLAGS on OS/2
This allows to build a DLL and to open files in binary mode.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
commit 7ab8ba341f9c5c9182413d4727f11c18319ee76c
Author: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed Apr 9 18:04:39 2014 +0200
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src $(CSS_CFLAGS)
dist_doc_DATA = AUTHORS ChangeLog COPYING NEWS README TODO
DISTCLEANFILES = ChangeLog
MAINTAINERCLEANFILES = ChangeLog
ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
-cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
......
......@@ -353,7 +353,7 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -Im4
AM_CPPFLAGS = -I$(top_srcdir)/src $(CSS_CFLAGS)
dist_doc_DATA = AUTHORS ChangeLog COPYING NEWS README TODO
DISTCLEANFILES = ChangeLog
MAINTAINERCLEANFILES = ChangeLog
EXTRA_DIST = msvc/ doc/footer.html doc/header.html
lib_LTLIBRARIES = libdvdread.la
libdvdread_la_SOURCES = \
......@@ -872,11 +872,11 @@ distclean-generic:
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f src/$(DEPDIR)/$(am__dirstamp)
-rm -f src/$(am__dirstamp)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
@APIDOC_FALSE@install-data-local:
@APIDOC_FALSE@uninstall-hook:
clean: clean-am
......
libdvdread (5.0.0)
* added support for Android
* fix build support for OS/2
* fix crashes in IFO parsing (Shark Week The Great Bites Collection)
libdvdread (4.9.9)
* major cleanup
* rewritten build system, including removal of configure2 and dvdread-config
* numerous crashes fixed, notably on ARCCOS protected DVDs,
like Transformers 3, Brave, The Express, Sherlock Holmes DVDs
* fix numerous crashes
* added QNX support
* updated to support libdvdcss 1.3.0
* improved dlopen support for Win32
* simplify static linking of libdvdcss
libdvdread (4.2.1)
* fix huge memory consumption when reading DVDs: "Up" and "Dark Knight"
* numerous crashes fixed, notably on ARCCOS protected DVDs,
like Transformers 3, Brave, The Express, Sherlock Holmes
and Cars 2,
* fix packed structures with mingw gcc >= 4.7
libdvdread (4.2.0)
* added OS/2 support
* fixed ARM memory alignment issue
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libdvdread 4.9.9.
# Generated by GNU Autoconf 2.69 for libdvdread 5.0.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libdvdread'
PACKAGE_TARNAME='libdvdread'
PACKAGE_VERSION='4.9.9'
PACKAGE_STRING='libdvdread 4.9.9'
PACKAGE_VERSION='5.0.0'
PACKAGE_STRING='libdvdread 5.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libdvdread 4.9.9 to adapt to many kinds of systems.
\`configure' configures libdvdread 5.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1401,7 +1401,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libdvdread 4.9.9:";;
short | recursive ) echo "Configuration of libdvdread 5.0.0:";;
esac
cat <<\_ACEOF
......@@ -1521,7 +1521,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libdvdread configure 4.9.9
libdvdread configure 5.0.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1886,7 +1886,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libdvdread $as_me 4.9.9, which was
It was created by libdvdread $as_me 5.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2827,7 +2827,7 @@ fi
# Define the identity of the package.
PACKAGE='libdvdread'
VERSION='4.9.9'
VERSION='5.0.0'
cat >>confdefs.h <<_ACEOF
......@@ -12739,6 +12739,13 @@ done
;;
esac
case $host in #(
*-os2-*) :
LDFLAGS="-no-undefined -Zbin-files $LDFLAGS" ;; #(
*) :
;;
esac
# Check whether --with-libdvdcss was given.
if test "${with_libdvdcss+set}" = set; then :
......@@ -13063,7 +13070,7 @@ fi
for flag in -Wall -Wsign-compare; do
for flag in -Wall -Wsign-compare -Wextra; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $flag flag" >&5
$as_echo_n "checking if $CC supports $flag flag... " >&6; }
......@@ -13719,7 +13726,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libdvdread $as_me 4.9.9, which was
This file was extended by libdvdread $as_me 5.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -13785,7 +13792,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libdvdread config.status 4.9.9
libdvdread config.status 5.0.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_INIT(libdvdread, 4.9.9)
AC_INIT(libdvdread, 5.0.0)
AC_CONFIG_SRCDIR([src/dvd_reader.c])
AC_PREREQ(2.53)
......@@ -55,6 +55,9 @@ AC_C_BIGENDIAN
AS_CASE([$host],
[*mingw32* | *cygwin*], [AC_CHECK_FUNCS(gettimeofday)])
AS_CASE([$host],
[*-os2-*], LDFLAGS="-no-undefined -Zbin-files $LDFLAGS")
AC_ARG_WITH([libdvdcss],
AS_HELP_STRING([--with-libdvdcss], [Link directly against libdvdcss @<:@default=no@:>@]))
......@@ -81,7 +84,7 @@ AS_IF([test x"$with_libdvdcss" = "xyes"], [
])
AC_SUBST([CSS_REQUIRES])
CC_CHECK_CFLAGS_APPEND([-Wall -Wsign-compare])
CC_CHECK_CFLAGS_APPEND([-Wall -Wsign-compare -Wextra])
AC_ARG_ENABLE([apidoc],
......
......@@ -321,6 +321,7 @@ int dvdinput_setup(void)
fprintf(stderr, "libdvdread: Missing symbols in %s, "
"this shouldn't happen !\n", CSS_LIB);
dlclose(dvdcss_library);
dvdcss_library = NULL;
}
}
#endif /* HAVE_DVDCSS_DVDCSS_H */
......
......@@ -42,6 +42,13 @@ typedef struct dvd_input_s *dvd_input_t;
# define wstat _wstati64
#endif
#ifdef __ANDROID__
# undef lseek
# define lseek lseek64
# undef off_t
# define off_t off64_t
#endif
/**
* Function pointers that will be filled in by the input implementation.
* These functions provide the main API.
......
......@@ -32,6 +32,7 @@
#include <unistd.h> /* chdir, getcwd */
#include <limits.h> /* PATH_MAX */
#include <dirent.h> /* opendir, readdir */
#include <ctype.h> /* isalpha */
/* misc win32 helpers */
#ifdef WIN32
......
......@@ -416,12 +416,14 @@ static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Number,
*/
static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor )
{
uint32_t lbsize, MT_L, N_PM;
uint32_t lbsize;
Unicodedecode(&data[84], 128, VolumeDescriptor);
lbsize = GETN4(212); /* should be 2048 */
MT_L = GETN4(264); /* should be 6 */
N_PM = GETN4(268); /* should be 1 */
if (lbsize != DVD_VIDEO_LB_LEN) return 1;
/* MT_L = GETN4(264); */ /* should be 6 */
/* N_PM = GETN4(268); */ /* should be 1 */
if (lbsize != DVD_VIDEO_LB_LEN)
return 1;
return 0;
}
......@@ -529,7 +531,7 @@ static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *FileType,
else
UDFDescriptor( LogBlock, &TagID );
if( TagID == 261 ) {
if( TagID == FileEntry ) {
UDFFileEntry( LogBlock, FileType, partition, File );
memcpy(&tmpmap.file, File, sizeof(tmpmap.file));
tmpmap.filetype = *FileType;
......@@ -537,7 +539,7 @@ static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *FileType,
return 1;
};
} while( ( lbnum <= partition->Start + ICB.Location + ( ICB.Length - 1 )
/ DVD_VIDEO_LB_LEN ) && ( TagID != 261 ) );
/ DVD_VIDEO_LB_LEN ) && ( TagID != FileEntry ) );
return 0;
}
......@@ -604,7 +606,7 @@ static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName,
while( p < Dir.Length ) {
UDFDescriptor( &cached_dir[ p ], &TagID );
if( TagID == 257 ) {
if( TagID == FileIdentifierDescriptor ) {
p += UDFFileIdentifier( &cached_dir[ p ], &filechar,
filename, &tmpICB );
if(cache_file_info && !in_cache) {
......@@ -649,7 +651,7 @@ static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName,
}
}
UDFDescriptor( &directory[ p ], &TagID );
if( TagID == 257 ) {
if( TagID == FileIdentifierDescriptor ) {
p += UDFFileIdentifier( &directory[ p ], &filechar,
filename, FileICB );
if( !strcasecmp( FileName, filename ) ) {
......@@ -688,7 +690,7 @@ static int UDFGetAVDP( dvd_reader_t *device,
} else {
TagID = 0;
}
if (TagID != 2) {
if (TagID != AnchorVolumeDescriptorPointer) {
/* Not an anchor */
if( terminate ) return 0; /* Final try failed */
......@@ -762,12 +764,12 @@ static int UDFFindPartition( dvd_reader_t *device, int partnum,
else
UDFDescriptor( LogBlock, &TagID );
if( ( TagID == 5 ) && ( !part->valid ) ) {
if( ( TagID == PartitionDescriptor ) && ( !part->valid ) ) {
/* Partition Descriptor */
UDFPartition( LogBlock, &part->Flags, &part->Number,
part->Contents, &part->Start, &part->Length );
part->valid = ( partnum == part->Number );
} else if( ( TagID == 6 ) && ( !volvalid ) ) {
} else if( ( TagID == LogicalVolumeDescriptor ) && ( !volvalid ) ) {
/* Logical Volume Descriptor */
if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) {
/* TODO: sector size wrong! */
......@@ -776,7 +778,7 @@ static int UDFFindPartition( dvd_reader_t *device, int partnum,
}
} while( ( lbnum <= MVDS_location + ( MVDS_length - 1 )
/ DVD_VIDEO_LB_LEN ) && ( TagID != 8 )
/ DVD_VIDEO_LB_LEN ) && ( TagID != TerminatingDescriptor )
&& ( ( !part->valid ) || ( !volvalid ) ) );
if( ( !part->valid) || ( !volvalid ) ) {
......@@ -823,13 +825,13 @@ uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
UDFDescriptor( LogBlock, &TagID );
/* File Set Descriptor */
if( TagID == 256 ) /* File Set Descriptor */
if( TagID == FileSetDescriptor ) /* File Set Descriptor */
UDFLongAD( &LogBlock[ 400 ], &RootICB );
} while( ( lbnum < partition.Start + partition.Length )
&& ( TagID != 8 ) && ( TagID != 256 ) );
&& ( TagID != TerminatingDescriptor ) && ( TagID != FileSetDescriptor) );
/* Sanity checks. */
if( TagID != 256 )
if( TagID != FileSetDescriptor )
return 0;
if( RootICB.Partition != 0 )
return 0;
......@@ -909,7 +911,7 @@ static int UDFGetDescriptor( dvd_reader_t *device, int id,
/* Descriptor */
desc_found = 1;
} while( ( lbnum <= MVDS_location + ( MVDS_length - 1 )
/ DVD_VIDEO_LB_LEN ) && ( TagID != 8 )
/ DVD_VIDEO_LB_LEN ) && ( TagID != TerminatingDescriptor )
&& ( !desc_found) );
if( !desc_found ) {
......
......@@ -43,7 +43,7 @@
/**
* The current version.
*/
#define DVDREAD_VERSION 904
#define DVDREAD_VERSION 50000
/**
* The length of one Logical Block of a DVD.
......
......@@ -23,7 +23,7 @@
#include <sys/types.h>
#ifdef _WIN32
#include <unistd.h>
# include <unistd.h>
#endif /* _WIN32 */
#include "dvdread/dvd_reader.h"
......@@ -35,6 +35,31 @@
__FILE__, __LINE__, # arg ); \
}
enum TagIdentifier {
/* ECMA 167 3/7.2.1 */
PrimaryVolumeDescriptor = 1,
AnchorVolumeDescriptorPointer = 2,
VolumeDescriptorPointer = 3,
ImplementationUseVolumeDescriptor = 4,
PartitionDescriptor = 5,
LogicalVolumeDescriptor = 6,
UnallocatedSpaceDescriptor = 7,
TerminatingDescriptor = 8,
LogicalVolumeIntegrityDescriptor = 9,
/* ECMA 167 4/7.2.1 */
FileSetDescriptor = 256,
FileIdentifierDescriptor = 257,
AllocationExtentDescriptor = 258,
IndirectEntry = 259,
TerminalEntry = 260,
FileEntry = 261,
ExtendedAttributeHeaderDescriptor = 262,
UnallocatedSpaceEntry = 263,
SpaceBitmapDescriptor = 264,
PartitionIntegrityEntry = 265,
ExtendedFileEntry = 266,
};
int InternalUDFReadBlocksRaw(const dvd_reader_t *device, uint32_t lb_number,
size_t block_count, unsigned char *data, int encrypted);
......
......@@ -30,7 +30,7 @@
#include "dvdread/ifo_print.h"
/* Put this in some other file / package? It's used in nav_print too. */
static void ifo_print_time(int level, dvd_time_t *dtime) {
static void ifo_print_time(dvd_time_t *dtime) {
const char *rate;
assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
......@@ -61,7 +61,7 @@ static void ifo_print_time(int level, dvd_time_t *dtime) {
}
void dvdread_print_time(dvd_time_t *dtime) {
ifo_print_time(5, dtime);
ifo_print_time(dtime);
}
/* Put this in some other file / package? It's used in nav_print too.
......@@ -80,7 +80,7 @@ static void ifo_print_cmd(int row, vm_cmd_t *command) {
printf("\n");
}
static void ifo_print_video_attributes(int level, video_attr_t *attr) {
static void ifo_print_video_attributes(video_attr_t *attr) {
/* The following test is shorter but not correct ISO C,
memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */
......@@ -88,10 +88,9 @@ static void ifo_print_video_attributes(int level, video_attr_t *attr) {
&& attr->video_format == 0
&& attr->display_aspect_ratio == 0
&& attr->permitted_df == 0
&& attr->unknown1 == 0
&& attr->line21_cc_1 == 0
&& attr->line21_cc_2 == 0
&& attr->video_format == 0
&& attr->unknown1 == 0
&& attr->letterboxed == 0
&& attr->film_mode == 0) {
printf("-- Unspecified --");
......@@ -149,9 +148,6 @@ static void ifo_print_video_attributes(int level, video_attr_t *attr) {
printf("(please send a bug report), ");
}
printf("U%x, ", attr->unknown1);
/* assert(!attr->unknown1); */
if(attr->line21_cc_1 || attr->line21_cc_2) {
printf("NTSC CC ");
if(attr->line21_cc_1)
......@@ -187,13 +183,16 @@ static void ifo_print_video_attributes(int level, video_attr_t *attr) {
}
if(attr->film_mode) {
printf("film. ");
printf("film, ");
} else {
printf("video. "); //camera
printf("video, "); //camera
}
printf("Unknown1: %x", attr->unknown1);
}
static void ifo_print_audio_attributes(int level, audio_attr_t *attr) {
static void ifo_print_audio_attributes(audio_attr_t *attr) {
if(attr->audio_format == 0
&& attr->multichannel_extension == 0
......@@ -201,9 +200,9 @@ static void ifo_print_audio_attributes(int level, audio_attr_t *attr) {
&& attr->application_mode == 0
&& attr->quantization == 0
&& attr->sample_frequency == 0
&& attr->unknown1 == 0
&& attr->channels == 0
&& attr->lang_extension == 0
&& attr->unknown1 == 0
&& attr->unknown3 == 0) {
printf("-- Unspecified --");
return;
......@@ -348,12 +347,12 @@ static void ifo_print_audio_attributes(int level, audio_attr_t *attr) {
printf("Unknown3: %d ", attr->unknown3);
}
static void ifo_print_subp_attributes(int level, subp_attr_t *attr) {
static void ifo_print_subp_attributes(subp_attr_t *attr) {
if(attr->type == 0
&& attr->lang_code == 0
&& attr->zero1 == 0
&& attr->zero2 == 0
&& attr->lang_code == 0
&& attr->lang_extension== 0) {
printf("-- Unspecified --");
return;
......@@ -527,20 +526,20 @@ static void ifoPrint_VMGI_MAT(vmgi_mat_t *vmgi_mat) {
printf("Start sector of VMGM_VOBU_ADMAP: %08x\n",
vmgi_mat->vmgm_vobu_admap);
printf("Video attributes of VMGM_VOBS: ");
ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr);
ifo_print_video_attributes(&vmgi_mat->vmgm_video_attr);
printf("\n");
printf("VMGM Number of Audio attributes: %i\n",
vmgi_mat->nr_of_vmgm_audio_streams);
if(vmgi_mat->nr_of_vmgm_audio_streams > 0) {
printf("\tstream %i status: ", 1);
ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr);
ifo_print_audio_attributes(&vmgi_mat->vmgm_audio_attr);
printf("\n");
}
printf("VMGM Number of Sub-picture attributes: %i\n",
vmgi_mat->nr_of_vmgm_subp_streams);
if(vmgi_mat->nr_of_vmgm_subp_streams > 0) {
printf("\tstream %2i status: ", 1);
ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr);
ifo_print_subp_attributes(&vmgi_mat->vmgm_subp_attr);
printf("\n");
}
}
......@@ -569,14 +568,14 @@ static void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {
printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_admap);
printf("Video attributes of VTSM_VOBS: ");
ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr);
ifo_print_video_attributes(&vtsi_mat->vtsm_video_attr);
printf("\n");
printf("VTSM Number of Audio attributes: %i\n",
vtsi_mat->nr_of_vtsm_audio_streams);
if(vtsi_mat->nr_of_vtsm_audio_streams > 0) {
printf("\tstream %i status: ", 1);
ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr);
ifo_print_audio_attributes(&vtsi_mat->vtsm_audio_attr);
printf("\n");
}
......@@ -584,19 +583,19 @@ static void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {
vtsi_mat->nr_of_vtsm_subp_streams);
if(vtsi_mat->nr_of_vtsm_subp_streams > 0) {
printf("\tstream %2i status: ", 1);
ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr);
ifo_print_subp_attributes(&vtsi_mat->vtsm_subp_attr);
printf("\n");
}
printf("Video attributes of VTS_VOBS: ");
ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr);
ifo_print_video_attributes(&vtsi_mat->vts_video_attr);
printf("\n");
printf("VTS Number of Audio attributes: %i\n",
vtsi_mat->nr_of_vts_audio_streams);
for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) {
printf("\tstream %i status: ", i);
ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]);
ifo_print_audio_attributes(&vtsi_mat->vts_audio_attr[i]);
printf("\n");
}
......@@ -604,7 +603,7 @@ static void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {
vtsi_mat->nr_of_vts_subp_streams);
for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) {
printf("\tstream %2i status: ", i);
ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]);
ifo_print_subp_attributes(&vtsi_mat->vts_subp_attr[i]);
printf("\n");
}
}
......@@ -1029,31 +1028,31 @@ static void ifoPrint_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) {
printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat);
printf("Video attributes of VTSM_VOBS: ");
ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr);
ifo_print_video_attributes(&vts_attributes->vtsm_vobs_attr);
printf("\n");
printf("Number of Audio streams: %i\n",
vts_attributes->nr_of_vtsm_audio_streams);
if(vts_attributes->nr_of_vtsm_audio_streams > 0) {
printf("\tstream %i attributes: ", 1);
ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr);
ifo_print_audio_attributes(&vts_attributes->vtsm_audio_attr);
printf("\n");
}
printf("Number of Subpicture streams: %i\n",
vts_attributes->nr_of_vtsm_subp_streams);
if(vts_attributes->nr_of_vtsm_subp_streams > 0) {
printf("\tstream %2i attributes: ", 1);
ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr);
ifo_print_subp_attributes(&vts_attributes->vtsm_subp_attr);
printf("\n");
}
printf("Video attributes of VTSTT_VOBS: ");
ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr);
ifo_print_video_attributes(&vts_attributes->vtstt_vobs_video_attr);
printf("\n");
printf("Number of Audio streams: %i\n",
vts_attributes->nr_of_vtstt_audio_streams);
for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) {
printf("\tstream %i attributes: ", i);
ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]);
ifo_print_audio_attributes(&vts_attributes->vtstt_audio_attr[i]);
printf("\n");
}
......@@ -1061,7 +1060,7 @@ static void ifoPrint_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) {
vts_attributes->nr_of_vtstt_subp_streams);
for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) {