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
eabdc2a8
Commit
eabdc2a8
authored
Aug 23, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: use initial_padding instead of deprecated delay
parent
2df0c32e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
matroskaenc.c
libavformat/matroskaenc.c
+4
-3
oggenc.c
libavformat/oggenc.c
+4
-1
No files found.
libavformat/matroskaenc.c
View file @
eabdc2a8
...
@@ -742,13 +742,14 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
...
@@ -742,13 +742,14 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
if
(
!
(
st
->
disposition
&
AV_DISPOSITION_DEFAULT
))
if
(
!
(
st
->
disposition
&
AV_DISPOSITION_DEFAULT
))
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKFLAGDEFAULT
,
!!
(
st
->
disposition
&
AV_DISPOSITION_DEFAULT
));
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKFLAGDEFAULT
,
!!
(
st
->
disposition
&
AV_DISPOSITION_DEFAULT
));
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
codec
->
delay
)
{
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
codec
->
initial_padding
)
{
mkv
->
tracks
[
i
].
ts_offset
=
av_rescale_q
(
codec
->
delay
,
mkv
->
tracks
[
i
].
ts_offset
=
av_rescale_q
(
codec
->
initial_padding
,
(
AVRational
){
1
,
codec
->
sample_rate
},
(
AVRational
){
1
,
codec
->
sample_rate
},
st
->
time_base
);
st
->
time_base
);
put_ebml_uint
(
pb
,
MATROSKA_ID_CODECDELAY
,
put_ebml_uint
(
pb
,
MATROSKA_ID_CODECDELAY
,
av_rescale_q
(
codec
->
delay
,
(
AVRational
){
1
,
codec
->
sample_rate
},
av_rescale_q
(
codec
->
initial_padding
,
(
AVRational
){
1
,
codec
->
sample_rate
},
(
AVRational
){
1
,
1000000000
}));
(
AVRational
){
1
,
1000000000
}));
}
}
...
...
libavformat/oggenc.c
View file @
eabdc2a8
...
@@ -564,7 +564,10 @@ static int ogg_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
...
@@ -564,7 +564,10 @@ static int ogg_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
}
}
granule
=
(
oggstream
->
last_kf_pts
<<
oggstream
->
kfgshift
)
|
pframe_count
;
granule
=
(
oggstream
->
last_kf_pts
<<
oggstream
->
kfgshift
)
|
pframe_count
;
}
else
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_OPUS
)
}
else
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_OPUS
)
granule
=
pkt
->
pts
+
pkt
->
duration
+
av_rescale_q
(
st
->
codec
->
delay
,
(
AVRational
){
1
,
st
->
codec
->
sample_rate
},
st
->
time_base
);
granule
=
pkt
->
pts
+
pkt
->
duration
+
av_rescale_q
(
st
->
codec
->
initial_padding
,
(
AVRational
){
1
,
st
->
codec
->
sample_rate
},
st
->
time_base
);
else
else
granule
=
pkt
->
pts
+
pkt
->
duration
;
granule
=
pkt
->
pts
+
pkt
->
duration
;
...
...
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