Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
fc263f07
Commit
fc263f07
authored
Jan 09, 2023
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/nsvdec: add support for STARDIVA format
parent
e30bf5ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
nsvdec.c
libavformat/nsvdec.c
+18
-0
No files found.
libavformat/nsvdec.c
View file @
fc263f07
...
...
@@ -195,6 +195,7 @@ static const AVCodecTag nsv_codec_video_tags[] = {
{ AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },
*/
{
AV_CODEC_ID_MPEG4
,
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
)
},
/* cf sample xvid decoder from nsv_codec_sdk.zip */
{
AV_CODEC_ID_H264
,
MKTAG
(
'H'
,
'2'
,
'6'
,
'4'
)
},
{
AV_CODEC_ID_RAWVIDEO
,
MKTAG
(
'R'
,
'G'
,
'B'
,
'3'
)
},
{
AV_CODEC_ID_NONE
,
0
},
};
...
...
@@ -203,6 +204,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = {
{
AV_CODEC_ID_MP3
,
MKTAG
(
'M'
,
'P'
,
'3'
,
' '
)
},
{
AV_CODEC_ID_AAC
,
MKTAG
(
'A'
,
'A'
,
'C'
,
' '
)
},
{
AV_CODEC_ID_AAC
,
MKTAG
(
'A'
,
'A'
,
'C'
,
'P'
)
},
{
AV_CODEC_ID_AAC
,
MKTAG
(
'A'
,
'A'
,
'V'
,
' '
)
},
{
AV_CODEC_ID_AAC
,
MKTAG
(
'V'
,
'L'
,
'B'
,
' '
)
},
{
AV_CODEC_ID_SPEEX
,
MKTAG
(
'S'
,
'P'
,
'X'
,
' '
)
},
{
AV_CODEC_ID_PCM_U16LE
,
MKTAG
(
'P'
,
'C'
,
'M'
,
' '
)
},
...
...
@@ -461,6 +463,22 @@ static int nsv_parse_NSVs_header(AVFormatContext *s)
st
->
codecpar
->
codec_tag
=
atag
;
st
->
codecpar
->
codec_id
=
ff_codec_get_id
(
nsv_codec_audio_tags
,
atag
);
if
(
atag
==
MKTAG
(
'A'
,
'A'
,
'V'
,
' '
))
{
static
const
uint8_t
aav_pce
[]
=
{
0x12
,
0x00
,
0x05
,
0x08
,
0x48
,
0x00
,
0x20
,
0x00
,
0xC6
,
0x40
,
0x04
,
0x4C
,
0x61
,
0x76
,
0x63
,
0x56
,
0xE5
,
0x00
,
0x00
,
0x00
,
};
int
ret
;
if
((
ret
=
ff_alloc_extradata
(
st
->
codecpar
,
sizeof
(
aav_pce
)))
<
0
)
return
ret
;
st
->
codecpar
->
sample_rate
=
44100
;
memcpy
(
st
->
codecpar
->
extradata
,
aav_pce
,
sizeof
(
aav_pce
));
}
ffstream
(
st
)
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
/* for PCM we will read a chunk later and put correct info */
/* set timebase to common denominator of ms and framerate */
...
...
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