Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
e97a64ef
Commit
e97a64ef
authored
Feb 01, 2006
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/mp4: more explicit error messages for DRMS failures.
parent
a3cb9de3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
modules/demux/mp4/drms.c
modules/demux/mp4/drms.c
+11
-9
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+4
-2
No files found.
modules/demux/mp4/drms.c
View file @
e97a64ef
...
@@ -289,8 +289,10 @@ void drms_decrypt( void *_p_drms, uint32_t *p_buffer, uint32_t i_bytes )
...
@@ -289,8 +289,10 @@ void drms_decrypt( void *_p_drms, uint32_t *p_buffer, uint32_t i_bytes )
* 0: success
* 0: success
* -1: unimplemented
* -1: unimplemented
* -2: invalid argument
* -2: invalid argument
* -3: failed to get user key
* -3: could not get system key
* -4: invalid user key
* -4: could not get SCI data
* -5: no user key found in SCI data
* -6: invalid user key
*****************************************************************************/
*****************************************************************************/
int
drms_init
(
void
*
_p_drms
,
uint32_t
i_type
,
int
drms_init
(
void
*
_p_drms
,
uint32_t
i_type
,
uint8_t
*
p_info
,
uint32_t
i_len
)
uint8_t
*
p_info
,
uint32_t
i_len
)
...
@@ -363,9 +365,9 @@ int drms_init( void *_p_drms, uint32_t i_type,
...
@@ -363,9 +365,9 @@ int drms_init( void *_p_drms, uint32_t i_type,
}
}
else
else
{
{
if
(
GetUserKey
(
p_drms
,
p_drms
->
p_key
)
)
i_ret
=
GetUserKey
(
p_drms
,
p_drms
->
p_key
);
if
(
i_ret
)
{
{
i_ret
=
-
3
;
break
;
break
;
}
}
}
}
...
@@ -379,7 +381,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
...
@@ -379,7 +381,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
if
(
p_priv
[
0
]
!=
0x6e757469
)
/* itun */
if
(
p_priv
[
0
]
!=
0x6e757469
)
/* itun */
{
{
i_ret
=
-
4
;
i_ret
=
-
6
;
break
;
break
;
}
}
...
@@ -1638,9 +1640,9 @@ static int GetUserKey( void *_p_drms, uint32_t *p_user_key )
...
@@ -1638,9 +1640,9 @@ static int GetUserKey( void *_p_drms, uint32_t *p_user_key )
uint32_t
*
p_sci0
,
*
p_sci1
,
*
p_buffer
;
uint32_t
*
p_sci0
,
*
p_sci1
,
*
p_buffer
;
uint32_t
p_sci_key
[
4
];
uint32_t
p_sci_key
[
4
];
char
*
psz_ipod
;
char
*
psz_ipod
;
int
i_ret
=
-
1
;
int
i_ret
=
-
5
;
if
(
!
ReadUserKey
(
p_drms
,
p_user_key
)
)
if
(
ReadUserKey
(
p_drms
,
p_user_key
)
==
0
)
{
{
REVERSE
(
p_user_key
,
4
);
REVERSE
(
p_user_key
,
4
);
return
0
;
return
0
;
...
@@ -1650,12 +1652,12 @@ static int GetUserKey( void *_p_drms, uint32_t *p_user_key )
...
@@ -1650,12 +1652,12 @@ static int GetUserKey( void *_p_drms, uint32_t *p_user_key )
if
(
GetSystemKey
(
p_sys_key
,
psz_ipod
?
VLC_TRUE
:
VLC_FALSE
)
)
if
(
GetSystemKey
(
p_sys_key
,
psz_ipod
?
VLC_TRUE
:
VLC_FALSE
)
)
{
{
return
-
1
;
return
-
3
;
}
}
if
(
GetSCIData
(
psz_ipod
,
&
p_sci_data
,
&
i_sci_size
)
)
if
(
GetSCIData
(
psz_ipod
,
&
p_sci_data
,
&
i_sci_size
)
)
{
{
return
-
1
;
return
-
4
;
}
}
/* Phase 1: unscramble the SCI data using the system key and shuffle
/* Phase 1: unscramble the SCI data using the system key and shuffle
...
...
modules/demux/mp4/libmp4.c
View file @
e97a64ef
...
@@ -2045,8 +2045,10 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -2045,8 +2045,10 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
{
{
case
-
1
:
psz_error
=
"unimplemented"
;
break
;
case
-
1
:
psz_error
=
"unimplemented"
;
break
;
case
-
2
:
psz_error
=
"invalid argument"
;
break
;
case
-
2
:
psz_error
=
"invalid argument"
;
break
;
case
-
3
:
psz_error
=
"could not get user key"
;
break
;
case
-
3
:
psz_error
=
"could not get system key"
;
break
;
case
-
4
:
psz_error
=
"invalid user key"
;
break
;
case
-
4
:
psz_error
=
"could not get SCI data"
;
break
;
case
-
5
:
psz_error
=
"no user key found in SCI data"
;
break
;
case
-
6
:
psz_error
=
"invalid user key"
;
break
;
default:
psz_error
=
"unknown error"
;
break
;
default:
psz_error
=
"unknown error"
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment