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
962d6315
Commit
962d6315
authored
May 27, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskaenc: set the stream timebase earlier
Fixes calculating the ts offset for audio codecs with delay.
parent
43e7f079
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
27 deletions
+27
-27
matroskaenc.c
libavformat/matroskaenc.c
+3
-3
mkv
tests/ref/lavf/mkv
+2
-2
lavf-mkv
tests/ref/seek/lavf-mkv
+22
-22
No files found.
libavformat/matroskaenc.c
View file @
962d6315
...
...
@@ -620,6 +620,9 @@ static int mkv_write_tracks(AVFormatContext *s)
int
output_sample_rate
=
0
;
AVDictionaryEntry
*
tag
;
// ms precision is the de-facto standard timescale for mkv files
avpriv_set_pts_info
(
st
,
64
,
1
,
1000
);
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_ATTACHMENT
)
{
mkv
->
have_attachments
=
1
;
continue
;
...
...
@@ -759,9 +762,6 @@ static int mkv_write_tracks(AVFormatContext *s)
if
(
ret
<
0
)
return
ret
;
end_ebml_master
(
pb
,
track
);
// ms precision is the de-facto standard timescale for mkv files
avpriv_set_pts_info
(
st
,
64
,
1
,
1000
);
}
end_ebml_master
(
pb
,
tracks
);
return
0
;
...
...
tests/ref/lavf/mkv
View file @
962d6315
f424aea501255b846f579e1231a99f57
*./tests/data/lavf/lavf.mkv
32038
1
./tests/data/lavf/lavf.mkv
268fb8f9278b0df2f87a6a9455f3cd56
*./tests/data/lavf/lavf.mkv
32038
0
./tests/data/lavf/lavf.mkv
./tests/data/lavf/lavf.mkv CRC=0xbe7d3cda
tests/ref/seek/lavf-mkv
View file @
962d6315
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 0 flags:0 ts: 0.788000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 0 flags:1 ts:-0.317000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st: 1 flags:0 ts: 2.577000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.471000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
10
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
09
size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
2
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
1
size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st: 0 flags:0 ts: 2.153000
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.048000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 1 flags:0 ts:-0.058000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
10
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
09
size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
2
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
1
size: 27925
ret: 0 st: 0 flags:0 ts:-0.482000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st: 0 flags:1 ts: 2.413000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 1 flags:0 ts: 1.307000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 0.201000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 0 flags:0 ts: 0.883000
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
9
size: 27834
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 29226
8
size: 27834
ret: 0 st: 0 flags:1 ts:-0.222000
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
ret: 0 st: 1 flags:0 ts: 2.672000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.566000
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
10
size: 209
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 3201
09
size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
2
size: 27925
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 14682
1
size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
1
size: 208
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 63
0
size: 208
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