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
ea0010bf
Commit
ea0010bf
authored
Apr 26, 2018
by
Alex Converse
Committed by
Alex Converse
May 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flvenc: Fix sequence header update timestamps
parent
4d3dd167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
flvenc.c
libavformat/flvenc.c
+4
-4
No files found.
libavformat/flvenc.c
View file @
ea0010bf
...
...
@@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s,
return
AVERROR
(
ENOSYS
);
}
static
void
flv_write_codec_header
(
AVFormatContext
*
s
,
AVCodecParameters
*
par
)
{
static
void
flv_write_codec_header
(
AVFormatContext
*
s
,
AVCodecParameters
*
par
,
int64_t
ts
)
{
int64_t
data_size
;
AVIOContext
*
pb
=
s
->
pb
;
FLVContext
*
flv
=
s
->
priv_data
;
...
...
@@ -497,7 +497,7 @@ static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* par) {
par
->
codec_type
==
AVMEDIA_TYPE_VIDEO
?
FLV_TAG_TYPE_VIDEO
:
FLV_TAG_TYPE_AUDIO
);
avio_wb24
(
pb
,
0
);
// size patched later
put_timestamp
(
pb
,
0
);
put_timestamp
(
pb
,
ts
);
avio_wb24
(
pb
,
0
);
// streamid
pos
=
avio_tell
(
pb
);
if
(
par
->
codec_id
==
AV_CODEC_ID_AAC
)
{
...
...
@@ -760,7 +760,7 @@ static int flv_write_header(AVFormatContext *s)
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
flv_write_codec_header
(
s
,
s
->
streams
[
i
]
->
codecpar
);
flv_write_codec_header
(
s
,
s
->
streams
[
i
]
->
codecpar
,
0
);
}
flv
->
datastart_offset
=
avio_tell
(
pb
);
...
...
@@ -904,7 +904,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
}
memcpy
(
par
->
extradata
,
side
,
side_size
);
par
->
extradata_size
=
side_size
;
flv_write_codec_header
(
s
,
par
);
flv_write_codec_header
(
s
,
par
,
pkt
->
dts
);
}
}
...
...
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