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
92281850
Commit
92281850
authored
Oct 12, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nut: support pcm codecs not mapped in avi
The native tags will be used when available.
parent
1bd442c2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
3 deletions
+34
-3
nut.texi
doc/nut.texi
+1
-1
nut.c
libavformat/nut.c
+26
-1
nut.h
libavformat/nut.h
+1
-0
nutdec.c
libavformat/nutdec.c
+6
-1
No files found.
doc/nut.texi
View file @
92281850
...
...
@@ -50,7 +50,7 @@ to be read big-endian.
@end multitable
<type> is S for signed integer, U for unsigned integer, F for IEEE float
<interleaving> is D for default,
as a historical artefact
.
<interleaving> is D for default,
P is for planar
.
<bits> is 8/16/24/32
@example
...
...
libavformat/nut.c
View file @
92281850
...
...
@@ -90,8 +90,33 @@ const AVCodecTag ff_nut_video_tags[] = {
{
AV_CODEC_ID_NONE
,
0
}
};
const
AVCodecTag
ff_nut_audio_tags
[]
=
{
{
AV_CODEC_ID_PCM_ALAW
,
MKTAG
(
'A'
,
'L'
,
'A'
,
'W'
)
},
{
AV_CODEC_ID_PCM_MULAW
,
MKTAG
(
'U'
,
'L'
,
'A'
,
'W'
)
},
{
AV_CODEC_ID_PCM_F32BE
,
MKTAG
(
32
,
'D'
,
'F'
,
'P'
)
},
{
AV_CODEC_ID_PCM_F32LE
,
MKTA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nut_codec_tags
[]
=
{
ff_nut_video_tags
,
ff_nut_subtitle_tags
,
ff_nut_video_tags
,
ff_nut_
audio_tags
,
ff_nut_
subtitle_tags
,
ff_codec_bmp_tags
,
ff_codec_wav_tags
,
0
};
...
...
libavformat/nut.h
View file @
92281850
...
...
@@ -105,6 +105,7 @@ typedef struct NUTContext {
extern
const
AVCodecTag
ff_nut_subtitle_tags
[];
extern
const
AVCodecTag
ff_nut_video_tags
[];
extern
const
AVCodecTag
ff_nut_audio_tags
[];
extern
const
AVCodecTag
*
const
ff_nut_codec_tags
[];
...
...
libavformat/nutdec.c
View file @
92281850
...
...
@@ -358,7 +358,12 @@ static int decode_stream_header(NUTContext *nut)
break
;
case
1
:
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_wav_tags
,
tmp
);
st
->
codec
->
codec_id
=
av_codec_get_id
((
const
AVCodecTag
*
const
[])
{
ff_nut_audio_tags
,
ff_codec_wav_tags
,
0
},
tmp
);
break
;
case
2
:
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
...
...
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