Donate to
e Foundation
|
Murena
handsets with /e/OS | Own a part of Murena!
Learn more
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
android_frameworks_av
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
e
os
android_frameworks_av
Commits
f0d7854e
Commit
f0d7854e
authored
9 years ago
by
Marco Nelissen
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Handle error result from DrmManagerClient correctly"
parents
9cd5f811
d066bc8f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/media/stagefright/FileSource.h
+1
-1
1 addition, 1 deletion
include/media/stagefright/FileSource.h
media/libstagefright/FileSource.cpp
+2
-2
2 additions, 2 deletions
media/libstagefright/FileSource.cpp
with
3 additions
and
3 deletions
include/media/stagefright/FileSource.h
+
1
−
1
View file @
f0d7854e
...
@@ -56,7 +56,7 @@ private:
...
@@ -56,7 +56,7 @@ private:
sp
<
DecryptHandle
>
mDecryptHandle
;
sp
<
DecryptHandle
>
mDecryptHandle
;
DrmManagerClient
*
mDrmManagerClient
;
DrmManagerClient
*
mDrmManagerClient
;
int64_t
mDrmBufOffset
;
int64_t
mDrmBufOffset
;
size_t
mDrmBufSize
;
s
size_t
mDrmBufSize
;
unsigned
char
*
mDrmBuf
;
unsigned
char
*
mDrmBuf
;
ssize_t
readAtDRM
(
off64_t
offset
,
void
*
data
,
size_t
size
);
ssize_t
readAtDRM
(
off64_t
offset
,
void
*
data
,
size_t
size
);
...
...
This diff is collapsed.
Click to expand it.
media/libstagefright/FileSource.cpp
+
2
−
2
View file @
f0d7854e
...
@@ -166,7 +166,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) {
...
@@ -166,7 +166,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) {
}
}
if
(
mDrmBuf
!=
NULL
&&
mDrmBufSize
>
0
&&
(
offset
+
mOffset
)
>=
mDrmBufOffset
if
(
mDrmBuf
!=
NULL
&&
mDrmBufSize
>
0
&&
(
offset
+
mOffset
)
>=
mDrmBufOffset
&&
(
offset
+
mOffset
+
size
)
<=
(
mDrmBufOffset
+
mDrmBufSize
))
{
&&
(
offset
+
mOffset
+
size
)
<=
static_cast
<
size_t
>
(
mDrmBufOffset
+
mDrmBufSize
))
{
/* Use buffered data */
/* Use buffered data */
memcpy
(
data
,
(
void
*
)(
mDrmBuf
+
(
offset
+
mOffset
-
mDrmBufOffset
)),
size
);
memcpy
(
data
,
(
void
*
)(
mDrmBuf
+
(
offset
+
mOffset
-
mDrmBufOffset
)),
size
);
return
size
;
return
size
;
...
@@ -177,7 +177,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) {
...
@@ -177,7 +177,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) {
DRM_CACHE_SIZE
,
offset
+
mOffset
);
DRM_CACHE_SIZE
,
offset
+
mOffset
);
if
(
mDrmBufSize
>
0
)
{
if
(
mDrmBufSize
>
0
)
{
int64_t
dataRead
=
0
;
int64_t
dataRead
=
0
;
dataRead
=
size
>
mDrmBufSize
?
mDrmBufSize
:
size
;
dataRead
=
size
>
static_cast
<
size_t
>
(
mDrmBufSize
)
?
mDrmBufSize
:
size
;
memcpy
(
data
,
(
void
*
)
mDrmBuf
,
dataRead
);
memcpy
(
data
,
(
void
*
)
mDrmBuf
,
dataRead
);
return
dataRead
;
return
dataRead
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment