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
2905c512
Commit
2905c512
authored
Nov 10, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rsd: XMA2 is actually stored, not XMA1
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
8f3a9603
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
rsd.c
libavformat/rsd.c
+6
-6
No files found.
libavformat/rsd.c
View file @
2905c512
...
...
@@ -33,7 +33,7 @@ static const AVCodecTag rsd_tags[] = {
{
AV_CODEC_ID_ADPCM_IMA_WAV
,
MKTAG
(
'X'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_PCM_S16BE
,
MKTAG
(
'P'
,
'C'
,
'M'
,
'B'
)
},
{
AV_CODEC_ID_PCM_S16LE
,
MKTAG
(
'P'
,
'C'
,
'M'
,
' '
)
},
{
AV_CODEC_ID_XMA
1
,
MKTAG
(
'X'
,
'M'
,
'A'
,
' '
)
},
{
AV_CODEC_ID_XMA
2
,
MKTAG
(
'X'
,
'M'
,
'A'
,
' '
)
},
{
AV_CODEC_ID_NONE
,
0
},
};
...
...
@@ -95,12 +95,12 @@ static int rsd_read_header(AVFormatContext *s)
avio_skip
(
pb
,
4
);
// Unknown
switch
(
codec
->
codec_id
)
{
case
AV_CODEC_ID_XMA
1
:
case
AV_CODEC_ID_XMA
2
:
codec
->
block_align
=
2048
;
ff_alloc_extradata
(
codec
,
28
);
ff_alloc_extradata
(
codec
,
34
);
if
(
!
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
memset
(
codec
->
extradata
,
0
,
28
);
memset
(
codec
->
extradata
,
0
,
34
);
break
;
case
AV_CODEC_ID_ADPCM_PSX
:
codec
->
block_align
=
16
*
codec
->
channels
;
...
...
@@ -160,7 +160,7 @@ static int rsd_read_header(AVFormatContext *s)
}
avio_skip
(
pb
,
start
-
avio_tell
(
pb
));
if
(
codec
->
codec_id
==
AV_CODEC_ID_XMA
1
)
{
if
(
codec
->
codec_id
==
AV_CODEC_ID_XMA
2
)
{
avio_skip
(
pb
,
avio_rb32
(
pb
)
+
avio_rb32
(
pb
));
st
->
duration
=
avio_rb32
(
pb
);
}
...
...
@@ -181,7 +181,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_RAD
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_PSX
||
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_WAV
||
codec
->
codec_id
==
AV_CODEC_ID_XMA
1
)
{
codec
->
codec_id
==
AV_CODEC_ID_XMA
2
)
{
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
codec
->
block_align
);
}
else
if
(
codec
->
codec_tag
==
MKTAG
(
'W'
,
'A'
,
'D'
,
'P'
)
&&
codec
->
channels
>
1
)
{
...
...
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