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
01c63e69
Commit
01c63e69
authored
Nov 19, 2015
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rsd: GADP files are adpcm_thp_le
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
3d2363fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
rsd.c
libavformat/rsd.c
+6
-9
No files found.
libavformat/rsd.c
View file @
01c63e69
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
static
const
AVCodecTag
rsd_tags
[]
=
{
static
const
AVCodecTag
rsd_tags
[]
=
{
{
AV_CODEC_ID_ADPCM_PSX
,
MKTAG
(
'V'
,
'A'
,
'G'
,
' '
)
},
{
AV_CODEC_ID_ADPCM_PSX
,
MKTAG
(
'V'
,
'A'
,
'G'
,
' '
)
},
{
AV_CODEC_ID_ADPCM_THP
,
MKTAG
(
'G'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_THP
_LE
,
MKTAG
(
'G'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_THP
,
MKTAG
(
'W'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_THP
,
MKTAG
(
'W'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_IMA_RAD
,
MKTAG
(
'R'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_IMA_RAD
,
MKTAG
(
'R'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_IMA_WAV
,
MKTAG
(
'X'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_IMA_WAV
,
MKTAG
(
'X'
,
'A'
,
'D'
,
'P'
)
},
...
@@ -121,8 +121,7 @@ static int rsd_read_header(AVFormatContext *s)
...
@@ -121,8 +121,7 @@ static int rsd_read_header(AVFormatContext *s)
if
(
pb
->
seekable
)
if
(
pb
->
seekable
)
st
->
duration
=
av_get_audio_frame_duration
(
codec
,
avio_size
(
pb
)
-
start
);
st
->
duration
=
av_get_audio_frame_duration
(
codec
,
avio_size
(
pb
)
-
start
);
break
;
break
;
case
AV_CODEC_ID_ADPCM_THP
:
case
AV_CODEC_ID_ADPCM_THP_LE
:
if
(
st
->
codec
->
codec_tag
==
MKTAG
(
'G'
,
'A'
,
'D'
,
'P'
))
{
/* RSD3GADP is mono, so only alloc enough memory
/* RSD3GADP is mono, so only alloc enough memory
to store the coeff table for a single channel. */
to store the coeff table for a single channel. */
...
@@ -130,11 +129,10 @@ static int rsd_read_header(AVFormatContext *s)
...
@@ -130,11 +129,10 @@ static int rsd_read_header(AVFormatContext *s)
if
((
ret
=
ff_get_extradata
(
codec
,
s
->
pb
,
32
))
<
0
)
if
((
ret
=
ff_get_extradata
(
codec
,
s
->
pb
,
32
))
<
0
)
return
ret
;
return
ret
;
if
(
pb
->
seekable
)
for
(
i
=
0
;
i
<
16
;
i
++
)
st
->
duration
=
av_get_audio_frame_duration
(
codec
,
avio_size
(
pb
)
-
start
);
AV_WB16
(
codec
->
extradata
+
i
*
2
,
AV_RL16
(
codec
->
extradata
+
i
*
2
));
break
;
case
AV_CODEC_ID_ADPCM_THP
:
}
else
{
codec
->
block_align
=
8
*
codec
->
channels
;
codec
->
block_align
=
8
*
codec
->
channels
;
avio_skip
(
s
->
pb
,
0x1A4
-
avio_tell
(
s
->
pb
));
avio_skip
(
s
->
pb
,
0x1A4
-
avio_tell
(
s
->
pb
));
...
@@ -145,7 +143,6 @@ static int rsd_read_header(AVFormatContext *s)
...
@@ -145,7 +143,6 @@ static int rsd_read_header(AVFormatContext *s)
avio_read
(
s
->
pb
,
st
->
codec
->
extradata
+
32
*
i
,
32
);
avio_read
(
s
->
pb
,
st
->
codec
->
extradata
+
32
*
i
,
32
);
avio_skip
(
s
->
pb
,
8
);
avio_skip
(
s
->
pb
,
8
);
}
}
}
if
(
pb
->
seekable
)
if
(
pb
->
seekable
)
st
->
duration
=
(
avio_size
(
pb
)
-
start
)
/
(
8
*
st
->
codec
->
channels
)
*
14
;
st
->
duration
=
(
avio_size
(
pb
)
-
start
)
/
(
8
*
st
->
codec
->
channels
)
*
14
;
break
;
break
;
...
...
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