Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
639955f6
Commit
639955f6
authored
Mar 31, 2015
by
Vignesh Venkatasubramanian
Committed by
Gerrit Code Review
Mar 31, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "webmdec: Fix read_frame return value for calls after EOS"
parents
c2b8218e
1f05b19e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
webmdec.cc
webmdec.cc
+7
-0
webmdec.h
webmdec.h
+1
-0
No files found.
webmdec.cc
View file @
639955f6
...
...
@@ -63,6 +63,7 @@ int file_is_webm(struct WebmInputContext *webm_ctx,
struct
VpxInputContext
*
vpx_ctx
)
{
mkvparser
::
MkvReader
*
const
reader
=
new
mkvparser
::
MkvReader
(
vpx_ctx
->
file
);
webm_ctx
->
reader
=
reader
;
webm_ctx
->
reached_eos
=
0
;
mkvparser
::
EBMLHeader
header
;
long
long
pos
=
0
;
...
...
@@ -121,6 +122,11 @@ int webm_read_frame(struct WebmInputContext *webm_ctx,
uint8_t
**
buffer
,
size_t
*
bytes_in_buffer
,
size_t
*
buffer_size
)
{
// This check is needed for frame parallel decoding, in which case this
// function could be called even after it has reached end of input stream.
if
(
webm_ctx
->
reached_eos
)
{
return
1
;
}
mkvparser
::
Segment
*
const
segment
=
reinterpret_cast
<
mkvparser
::
Segment
*>
(
webm_ctx
->
segment
);
const
mkvparser
::
Cluster
*
cluster
=
...
...
@@ -140,6 +146,7 @@ int webm_read_frame(struct WebmInputContext *webm_ctx,
cluster
=
segment
->
GetNext
(
cluster
);
if
(
cluster
==
NULL
||
cluster
->
EOS
())
{
*
bytes_in_buffer
=
0
;
webm_ctx
->
reached_eos
=
1
;
return
1
;
}
status
=
cluster
->
GetFirst
(
block_entry
);
...
...
webmdec.h
View file @
639955f6
...
...
@@ -29,6 +29,7 @@ struct WebmInputContext {
int
video_track_index
;
uint64_t
timestamp_ns
;
int
is_key_frame
;
int
reached_eos
;
};
// Checks if the input is a WebM file. If so, initializes WebMInputContext so
...
...
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