Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
656e31ed
Commit
656e31ed
authored
Mar 21, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ogg: Forward errors further
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
b1834681
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
oggdec.c
libavformat/oggdec.c
+14
-5
No files found.
libavformat/oggdec.c
View file @
656e31ed
...
...
@@ -282,8 +282,11 @@ static int ogg_read_page(AVFormatContext *s, int *str)
os
=
ogg
->
streams
+
idx
;
os
->
page_pos
=
avio_tell
(
bc
)
-
27
;
if
(
os
->
psize
>
0
)
ogg_new_buf
(
ogg
,
idx
);
if
(
os
->
psize
>
0
)
{
ret
=
ogg_new_buf
(
ogg
,
idx
);
if
(
ret
<
0
)
return
ret
;
}
ret
=
avio_read
(
bc
,
os
->
segments
,
nsegs
);
if
(
ret
<
nsegs
)
...
...
@@ -503,7 +506,7 @@ static int ogg_get_headers(AVFormatContext *s)
static
int
ogg_get_length
(
AVFormatContext
*
s
)
{
struct
ogg
*
ogg
=
s
->
priv_data
;
int
i
;
int
i
,
ret
;
int64_t
size
,
end
;
if
(
!
s
->
pb
->
seekable
)
...
...
@@ -518,7 +521,9 @@ static int ogg_get_length(AVFormatContext *s)
return
0
;
end
=
size
>
MAX_PAGE_SIZE
?
size
-
MAX_PAGE_SIZE
:
0
;
ogg_save
(
s
);
ret
=
ogg_save
(
s
);
if
(
ret
<
0
)
return
ret
;
avio_seek
(
s
->
pb
,
end
,
SEEK_SET
);
while
(
!
ogg_read_page
(
s
,
&
i
))
{
...
...
@@ -570,7 +575,11 @@ static int ogg_read_header(AVFormatContext *s)
ogg
->
streams
[
i
].
codec
=
NULL
;
//linear granulepos seek from end
ogg_get_length
(
s
);
ret
=
ogg_get_length
(
s
);
if
(
ret
<
0
)
{
ogg_read_close
(
s
);
return
ret
;
}
//fill the extradata in the per codec callbacks
return
0
;
...
...
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