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
bacbbd2b
Commit
bacbbd2b
authored
Jun 25, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vocenc: fix sample rate rounding direction
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f15803e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
vocenc.c
libavformat/vocenc.c
+2
-2
voc
tests/ref/lavf/voc
+1
-1
voc_s16
tests/ref/lavf/voc_s16
+1
-1
lavf_voc
tests/ref/seek/lavf_voc
+12
-12
No files found.
libavformat/vocenc.c
View file @
bacbbd2b
...
...
@@ -64,13 +64,13 @@ static int voc_write_packet(AVFormatContext *s, AVPacket *pkt)
if
(
s
->
streams
[
0
]
->
codec
->
channels
>
1
)
{
avio_w8
(
pb
,
VOC_TYPE_EXTENDED
);
avio_wl24
(
pb
,
4
);
avio_wl16
(
pb
,
65536
-
256000000
/
(
enc
->
sample_rate
*
enc
->
channels
));
avio_wl16
(
pb
,
65536
-
(
256000000
+
enc
->
sample_rate
*
enc
->
channels
/
2
)
/
(
enc
->
sample_rate
*
enc
->
channels
));
avio_w8
(
pb
,
enc
->
codec_tag
);
avio_w8
(
pb
,
enc
->
channels
-
1
);
}
avio_w8
(
pb
,
VOC_TYPE_VOICE_DATA
);
avio_wl24
(
pb
,
pkt
->
size
+
2
);
avio_w8
(
pb
,
256
-
1000000
/
enc
->
sample_rate
);
avio_w8
(
pb
,
256
-
(
1000000
+
enc
->
sample_rate
/
2
)
/
enc
->
sample_rate
);
avio_w8
(
pb
,
enc
->
codec_tag
);
}
voc
->
param_written
=
1
;
...
...
tests/ref/lavf/voc
View file @
bacbbd2b
5c4ee01048e7a8a138a97e80cf7a1924
*./tests/data/lavf/lavf.voc
e4cefbeb4c20f5735de1877fbcfd8d1d
*./tests/data/lavf/lavf.voc
45261 ./tests/data/lavf/lavf.voc
./tests/data/lavf/lavf.voc CRC=0x74b2b546
tests/ref/lavf/voc_s16
View file @
bacbbd2b
8ed10b311e49b4d4b18679b126492159
*./tests/data/lavf/lavf.s16.voc
1d7be2b6527b76a33d2185ec6fb23f91
*./tests/data/lavf/lavf.s16.voc
180437 ./tests/data/lavf/lavf.s16.voc
./tests/data/lavf/lavf.s16.voc CRC=0x7bd585ff
tests/ref/seek/lavf_voc
View file @
bacbbd2b
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
ret:-1 st:-1 flags:0 ts:-1.000000
ret:-1 st:-1 flags:1 ts: 1.894167
ret:-1 st: 0 flags:0 ts: 0.78833
5
ret:-1 st: 0 flags:1 ts:-0.317
508
ret:-1 st: 0 flags:0 ts: 0.78833
0
ret:-1 st: 0 flags:1 ts:-0.317
494
ret:-1 st:-1 flags:0 ts: 2.576668
ret:-1 st:-1 flags:1 ts: 1.470835
ret:-1 st: 0 flags:0 ts: 0.3650
06
ret:-1 st: 0 flags:1 ts:-0.74083
7
ret:-1 st: 0 flags:0 ts: 0.3650
12
ret:-1 st: 0 flags:1 ts:-0.74083
4
ret:-1 st:-1 flags:0 ts: 2.153336
ret:-1 st:-1 flags:1 ts: 1.047503
ret:-1 st: 0 flags:0 ts:-0.05832
3
ret:-1 st: 0 flags:1 ts: 2.8358
34
ret:-1 st: 0 flags:0 ts:-0.05832
8
ret:-1 st: 0 flags:1 ts: 2.8358
48
ret:-1 st:-1 flags:0 ts: 1.730004
ret:-1 st:-1 flags:1 ts: 0.624171
ret:-1 st: 0 flags:0 ts:-0.4816
52
ret:-1 st: 0 flags:1 ts: 2.41250
5
ret:-1 st: 0 flags:0 ts:-0.4816
69
ret:-1 st: 0 flags:1 ts: 2.41250
7
ret:-1 st:-1 flags:0 ts: 1.306672
ret:-1 st:-1 flags:1 ts: 0.200839
ret:-1 st: 0 flags:0 ts:-0.90
5003
ret:-1 st: 0 flags:1 ts: 1.9891
76
ret:-1 st: 0 flags:0 ts:-0.90
4986
ret:-1 st: 0 flags:1 ts: 1.9891
67
ret:-1 st:-1 flags:0 ts: 0.883340
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.6716
68
ret:-1 st: 0 flags:1 ts: 1.56584
7
ret:-1 st: 0 flags:0 ts: 2.6716
73
ret:-1 st: 0 flags:1 ts: 1.56584
9
ret:-1 st:-1 flags:0 ts: 0.460008
ret:-1 st:-1 flags:1 ts:-0.645825
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