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
ec524ed1
Commit
ec524ed1
authored
Feb 02, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tta: Fix framepos and start_offset types
Also propagate errors. CC: libav-stable@libav.org Bug-Id: CID 1238812
parent
a6653787
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tta.c
libavformat/tta.c
+7
-2
No files found.
libavformat/tta.c
View file @
ec524ed1
...
...
@@ -45,12 +45,14 @@ static int tta_read_header(AVFormatContext *s)
TTAContext
*
c
=
s
->
priv_data
;
AVStream
*
st
;
int
i
,
channels
,
bps
,
samplerate
,
datalen
;
u
int64_t
framepos
,
start_offset
;
int64_t
framepos
,
start_offset
;
if
(
!
av_dict_get
(
s
->
metadata
,
""
,
NULL
,
AV_DICT_IGNORE_SUFFIX
))
ff_id3v1_read
(
s
);
start_offset
=
avio_tell
(
s
->
pb
);
if
(
start_offset
<
0
)
return
start_offset
;
if
(
avio_rl32
(
s
->
pb
)
!=
AV_RL32
(
"TTA1"
))
return
-
1
;
// not tta file
...
...
@@ -91,7 +93,10 @@ static int tta_read_header(AVFormatContext *s)
st
->
start_time
=
0
;
st
->
duration
=
datalen
;
framepos
=
avio_tell
(
s
->
pb
)
+
4
*
c
->
totalframes
+
4
;
framepos
=
avio_tell
(
s
->
pb
);
if
(
framepos
<
0
)
return
framepos
;
framepos
+=
4
*
c
->
totalframes
+
4
;
for
(
i
=
0
;
i
<
c
->
totalframes
;
i
++
)
{
uint32_t
size
=
avio_rl32
(
s
->
pb
);
...
...
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