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
dacbcd17
Commit
dacbcd17
authored
Jan 22, 2011
by
Kostya
Committed by
Janne Grunau
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reindent after last commit
Signed-off-by:
Janne Grunau
<
janne-ffmpeg@jannau.net
>
parent
3bdc886c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
25 deletions
+25
-25
wavpack.c
libavcodec/wavpack.c
+6
-6
wv.c
libavformat/wv.c
+19
-19
No files found.
libavcodec/wavpack.c
View file @
dacbcd17
...
@@ -706,7 +706,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
...
@@ -706,7 +706,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
else
else
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
if
(
avctx
->
channels
<=
2
&&
!
avctx
->
channel_layout
)
if
(
avctx
->
channels
<=
2
&&
!
avctx
->
channel_layout
)
avctx
->
channel_layout
=
(
avctx
->
channels
==
2
)
?
CH_LAYOUT_STEREO
:
CH_LAYOUT_MONO
;
avctx
->
channel_layout
=
(
avctx
->
channels
==
2
)
?
CH_LAYOUT_STEREO
:
CH_LAYOUT_MONO
;
s
->
multichannel
=
avctx
->
channels
>
2
;
s
->
multichannel
=
avctx
->
channels
>
2
;
/* lavf demuxer does not provide extradata, Matroska stores 0x403
/* lavf demuxer does not provide extradata, Matroska stores 0x403
...
@@ -775,11 +775,11 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
...
@@ -775,11 +775,11 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
}
}
if
(
!
wc
->
mkv_mode
){
if
(
!
wc
->
mkv_mode
){
s
->
samples
=
AV_RL32
(
buf
);
buf
+=
4
;
s
->
samples
=
AV_RL32
(
buf
);
buf
+=
4
;
if
(
!
s
->
samples
){
if
(
!
s
->
samples
){
*
data_size
=
0
;
*
data_size
=
0
;
return
buf_size
;
return
buf_size
;
}
}
}
else
{
}
else
{
s
->
samples
=
wc
->
samples
;
s
->
samples
=
wc
->
samples
;
}
}
...
...
libavformat/wv.c
View file @
dacbcd17
...
@@ -85,25 +85,25 @@ static int wv_read_block_header(AVFormatContext *ctx, ByteIOContext *pb, int app
...
@@ -85,25 +85,25 @@ static int wv_read_block_header(AVFormatContext *ctx, ByteIOContext *pb, int app
wc
->
pos
=
url_ftell
(
pb
);
wc
->
pos
=
url_ftell
(
pb
);
if
(
!
append
){
if
(
!
append
){
tag
=
get_le32
(
pb
);
tag
=
get_le32
(
pb
);
if
(
tag
!=
MKTAG
(
'w'
,
'v'
,
'p'
,
'k'
))
if
(
tag
!=
MKTAG
(
'w'
,
'v'
,
'p'
,
'k'
))
return
-
1
;
return
-
1
;
size
=
get_le32
(
pb
);
size
=
get_le32
(
pb
);
if
(
size
<
24
||
size
>
WV_BLOCK_LIMIT
){
if
(
size
<
24
||
size
>
WV_BLOCK_LIMIT
){
av_log
(
ctx
,
AV_LOG_ERROR
,
"Incorrect block size %i
\n
"
,
size
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Incorrect block size %i
\n
"
,
size
);
return
-
1
;
return
-
1
;
}
}
wc
->
blksize
=
size
;
wc
->
blksize
=
size
;
ver
=
get_le16
(
pb
);
ver
=
get_le16
(
pb
);
if
(
ver
<
0x402
||
ver
>
0x410
){
if
(
ver
<
0x402
||
ver
>
0x410
){
av_log
(
ctx
,
AV_LOG_ERROR
,
"Unsupported version %03X
\n
"
,
ver
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Unsupported version %03X
\n
"
,
ver
);
return
-
1
;
return
-
1
;
}
}
get_byte
(
pb
);
// track no
get_byte
(
pb
);
// track no
get_byte
(
pb
);
// track sub index
get_byte
(
pb
);
// track sub index
wc
->
samples
=
get_le32
(
pb
);
// total samples in file
wc
->
samples
=
get_le32
(
pb
);
// total samples in file
wc
->
soff
=
get_le32
(
pb
);
// offset in samples of current block
wc
->
soff
=
get_le32
(
pb
);
// offset in samples of current block
get_buffer
(
pb
,
wc
->
extra
,
WV_EXTRA_SIZE
);
get_buffer
(
pb
,
wc
->
extra
,
WV_EXTRA_SIZE
);
}
else
{
}
else
{
size
=
wc
->
blksize
;
size
=
wc
->
blksize
;
}
}
...
...
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