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
bb1d3f10
Commit
bb1d3f10
authored
Oct 18, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rsd: add VAG support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
6e8d856a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
rsd.c
libavformat/rsd.c
+7
-1
No files found.
libavformat/rsd.c
View file @
bb1d3f10
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "internal.h"
#include "internal.h"
static
const
AVCodecTag
rsd_tags
[]
=
{
static
const
AVCodecTag
rsd_tags
[]
=
{
{
AV_CODEC_ID_ADPCM_PSX
,
MKTAG
(
'V'
,
'A'
,
'G'
,
' '
)
},
{
AV_CODEC_ID_ADPCM_THP
,
MKTAG
(
'G'
,
'A'
,
'D'
,
'P'
)
},
{
AV_CODEC_ID_ADPCM_THP
,
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'
)
},
...
@@ -37,7 +38,6 @@ static const AVCodecTag rsd_tags[] = {
...
@@ -37,7 +38,6 @@ static const AVCodecTag rsd_tags[] = {
static
const
uint32_t
rsd_unsupported_tags
[]
=
{
static
const
uint32_t
rsd_unsupported_tags
[]
=
{
MKTAG
(
'O'
,
'G'
,
'G'
,
' '
),
MKTAG
(
'O'
,
'G'
,
'G'
,
' '
),
MKTAG
(
'V'
,
'A'
,
'G'
,
' '
),
MKTAG
(
'X'
,
'M'
,
'A'
,
' '
),
MKTAG
(
'X'
,
'M'
,
'A'
,
' '
),
};
};
...
@@ -95,6 +95,11 @@ static int rsd_read_header(AVFormatContext *s)
...
@@ -95,6 +95,11 @@ static int rsd_read_header(AVFormatContext *s)
avio_skip
(
pb
,
4
);
// Unknown
avio_skip
(
pb
,
4
);
// Unknown
switch
(
codec
->
codec_id
)
{
switch
(
codec
->
codec_id
)
{
case
AV_CODEC_ID_ADPCM_PSX
:
codec
->
block_align
=
16
*
codec
->
channels
;
if
(
pb
->
seekable
)
st
->
duration
=
av_get_audio_frame_duration
(
codec
,
avio_size
(
pb
)
-
start
);
break
;
case
AV_CODEC_ID_ADPCM_IMA_RAD
:
case
AV_CODEC_ID_ADPCM_IMA_RAD
:
codec
->
block_align
=
20
*
codec
->
channels
;
codec
->
block_align
=
20
*
codec
->
channels
;
if
(
pb
->
seekable
)
if
(
pb
->
seekable
)
...
@@ -163,6 +168,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -163,6 +168,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
return
AVERROR_EOF
;
return
AVERROR_EOF
;
if
(
codec
->
codec_id
==
AV_CODEC_ID_ADPCM_IMA_RAD
||
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_ADPCM_IMA_WAV
)
{
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
codec
->
block_align
);
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
codec
->
block_align
);
}
else
if
(
codec
->
codec_tag
==
MKTAG
(
'W'
,
'A'
,
'D'
,
'P'
)
&&
}
else
if
(
codec
->
codec_tag
==
MKTAG
(
'W'
,
'A'
,
'D'
,
'P'
)
&&
...
...
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