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
0c949060
Commit
0c949060
authored
Apr 06, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: support shorten in nistshpere demuxer
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
b7a776aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
shorten.c
libavcodec/shorten.c
+4
-0
nistspheredec.c
libavformat/nistspheredec.c
+5
-1
No files found.
libavcodec/shorten.c
View file @
0c949060
...
...
@@ -387,6 +387,9 @@ static int read_header(ShortenContext *s)
if
(
s
->
version
>
1
)
s
->
lpcqoffset
=
V2LPCQOFFSET
;
if
(
s
->
avctx
->
extradata_size
>
0
)
goto
end
;
if
(
get_ur_golomb_shorten
(
&
s
->
gb
,
FNSIZE
)
!=
FN_VERBATIM
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"missing verbatim section at beginning of stream
\n
"
);
...
...
@@ -407,6 +410,7 @@ static int read_header(ShortenContext *s)
if
((
ret
=
decode_wave_header
(
s
->
avctx
,
s
->
header
,
s
->
header_size
))
<
0
)
return
ret
;
end:
s
->
cur_chan
=
0
;
s
->
bitshift
=
0
;
...
...
libavformat/nistspheredec.c
View file @
0c949060
...
...
@@ -34,7 +34,7 @@ static int nist_probe(AVProbeData *p)
static
int
nist_read_header
(
AVFormatContext
*
s
)
{
char
buffer
[
32
],
coding
[
32
]
=
"pcm"
,
format
[
32
]
=
"01"
;
char
buffer
[
256
],
coding
[
32
]
=
"pcm"
,
format
[
32
]
=
"01"
;
int
bps
=
0
,
be
=
0
;
int32_t
header_size
=
-
1
;
AVStream
*
st
;
...
...
@@ -69,6 +69,10 @@ static int nist_read_header(AVFormatContext *s)
}
else
if
(
!
av_strcasecmp
(
coding
,
"ulaw"
)
||
!
av_strcasecmp
(
coding
,
"mu-law"
))
{
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_MULAW
;
}
else
if
(
!
av_strncasecmp
(
coding
,
"pcm,embedded-shorten"
,
20
))
{
st
->
codec
->
codec_id
=
AV_CODEC_ID_SHORTEN
;
if
(
ff_alloc_extradata
(
st
->
codec
,
1
))
st
->
codec
->
extradata
[
0
]
=
1
;
}
else
{
avpriv_request_sample
(
s
,
"coding %s"
,
coding
);
}
...
...
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