Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
b59e37e1
Commit
b59e37e1
authored
Apr 16, 2014
by
Vignesh Venkatasubramanian
Committed by
Gerrit Code Review
Apr 16, 2014
Browse files
Merge "webmdec: Fix return values for webm_read_frame"
parents
92ebef11
b92eb541
Changes
2
Hide whitespace changes
Inline
Side-by-side
webmdec.c
View file @
b59e37e1
...
...
@@ -115,6 +115,7 @@ int webm_read_frame(struct WebmInputContext *webm_ctx,
size_t
*
buffer_size
)
{
if
(
webm_ctx
->
chunk
>=
webm_ctx
->
chunks
)
{
uint32_t
track
;
int
status
;
do
{
/* End of this packet, get another. */
...
...
@@ -123,21 +124,23 @@ int webm_read_frame(struct WebmInputContext *webm_ctx,
webm_ctx
->
pkt
=
NULL
;
}
if
(
nestegg_read_packet
(
webm_ctx
->
nestegg_ctx
,
&
webm_ctx
->
pkt
)
<=
0
||
nestegg_packet_track
(
webm_ctx
->
pkt
,
&
track
))
{
return
1
;
}
status
=
nestegg_read_packet
(
webm_ctx
->
nestegg_ctx
,
&
webm_ctx
->
pkt
);
if
(
status
<=
0
)
return
status
?
status
:
1
;
if
(
nestegg_packet_track
(
webm_ctx
->
pkt
,
&
track
))
return
-
1
;
}
while
(
track
!=
webm_ctx
->
video_track
);
if
(
nestegg_packet_count
(
webm_ctx
->
pkt
,
&
webm_ctx
->
chunks
))
return
1
;
return
-
1
;
webm_ctx
->
chunk
=
0
;
}
if
(
nestegg_packet_data
(
webm_ctx
->
pkt
,
webm_ctx
->
chunk
,
buffer
,
bytes_in_buffer
))
{
return
1
;
return
-
1
;
}
webm_ctx
->
chunk
++
;
...
...
webmdec.h
View file @
b59e37e1
...
...
@@ -31,6 +31,11 @@ struct WebmInputContext {
int
file_is_webm
(
struct
WebmInputContext
*
webm_ctx
,
struct
VpxInputContext
*
vpx_ctx
);
/* Reads a WebM video frame. Return values:
* 0 - Success
* 1 - End of File
* -1 - Error
*/
int
webm_read_frame
(
struct
WebmInputContext
*
webm_ctx
,
uint8_t
**
buffer
,
size_t
*
bytes_in_buffer
,
...
...
Write
Preview
Supports
Markdown
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