[libbluray-devel] id.bdmv: accept version 0300 files
hpi1
git at videolan.org
Wed Aug 30 09:08:43 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug 28 19:02:52 2017 +0300| [440d9a46de4ddf578870237c29b7f4d714da7a6f] | committer: hpi1
id.bdmv: accept version 0300 files
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=440d9a46de4ddf578870237c29b7f4d714da7a6f
---
src/libbluray/bdnav/bdid_parse.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/libbluray/bdnav/bdid_parse.c b/src/libbluray/bdnav/bdid_parse.c
index dc90ea4f..71cfe405 100644
--- a/src/libbluray/bdnav/bdid_parse.c
+++ b/src/libbluray/bdnav/bdid_parse.c
@@ -22,6 +22,7 @@
#endif
#include "bdid_parse.h"
+#include "bdmv_parse.h"
#include "disc/disc.h"
@@ -34,27 +35,13 @@
#include <stdlib.h>
#define BDID_SIG1 ('B' << 24 | 'D' << 16 | 'I' << 8 | 'D')
-#define BDID_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
-#define BDID_SIG2B ('0' << 24 | '1' << 16 | '0' << 8 | '0')
static int _parse_header(BITSTREAM *bs, uint32_t *data_start, uint32_t *extension_data_start)
{
- uint32_t sig1, sig2;
-
- if (bs_seek_byte(bs, 0) < 0) {
+ if (!bdmv_parse_header(bs, BDID_SIG1, NULL)) {
return 0;
}
- sig1 = bs_read(bs, 32);
- sig2 = bs_read(bs, 32);
-
- if (sig1 != BDID_SIG1 ||
- (sig2 != BDID_SIG2A &&
- sig2 != BDID_SIG2B)) {
- BD_DEBUG(DBG_NAV | DBG_CRIT, "id.bdmv failed signature match: expected BDID0100 got %8.8s\n", bs->buf);
- return 0;
- }
-
*data_start = bs_read(bs, 32);
*extension_data_start = bs_read(bs, 32);
More information about the libbluray-devel
mailing list