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
8bac6483
Commit
8bac6483
authored
Jul 20, 2019
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/vividas: forward errors from track_header()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
5dc94924
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
vividas.c
libavformat/vividas.c
+8
-4
No files found.
libavformat/vividas.c
View file @
8bac6483
...
...
@@ -273,7 +273,7 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned *size,
return
buf
;
}
static
void
track_header
(
VividasDemuxContext
*
viv
,
AVFormatContext
*
s
,
uint8_t
*
buf
,
int
size
)
static
int
track_header
(
VividasDemuxContext
*
viv
,
AVFormatContext
*
s
,
uint8_t
*
buf
,
int
size
)
{
int
i
,
j
;
int64_t
off
;
...
...
@@ -283,7 +283,7 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
pb
=
avio_alloc_context
(
buf
,
size
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
pb
)
return
;
return
AVERROR
(
ENOMEM
)
;
ffio_read_varlen
(
pb
);
// track_header_len
avio_r8
(
pb
);
// '1'
...
...
@@ -380,7 +380,7 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
st
->
codecpar
->
extradata_size
=
64
+
xd_size
+
xd_size
/
255
;
if
(
ff_alloc_extradata
(
st
->
codecpar
,
st
->
codecpar
->
extradata_size
))
return
;
return
AVERROR
(
ENOMEM
)
;
p
=
st
->
codecpar
->
extradata
;
p
[
0
]
=
2
;
...
...
@@ -404,6 +404,7 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
}
av_free
(
pb
);
return
0
;
}
static
void
track_index
(
VividasDemuxContext
*
viv
,
AVFormatContext
*
s
,
uint8_t
*
buf
,
unsigned
size
)
...
...
@@ -506,6 +507,7 @@ static int viv_read_header(AVFormatContext *s)
uint32_t
b22_size
=
0
;
uint32_t
b22_key
=
0
;
uint8_t
*
buf
=
0
;
int
ret
;
avio_skip
(
pb
,
9
);
...
...
@@ -561,8 +563,10 @@ static int viv_read_header(AVFormatContext *s)
buf
=
read_vblock
(
pb
,
&
v
,
key
,
&
k2
,
0
);
if
(
!
buf
)
return
AVERROR
(
EIO
);
track_header
(
viv
,
s
,
buf
,
v
);
ret
=
track_header
(
viv
,
s
,
buf
,
v
);
av_free
(
buf
);
if
(
ret
<
0
)
return
ret
;
buf
=
read_vblock
(
pb
,
&
v
,
key
,
&
k2
,
v
);
if
(
!
buf
)
...
...
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