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
46911c7a
Commit
46911c7a
authored
Jan 14, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use delay to avoid negative dts
Originally committed as revision 16604 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
de34dc39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
mpegtsenc.c
libavformat/mpegtsenc.c
+3
-2
libav.regression.ref
tests/libav.regression.ref
+1
-1
No files found.
libavformat/mpegtsenc.c
View file @
46911c7a
...
...
@@ -672,6 +672,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
MpegTSWriteStream
*
ts_st
=
st
->
priv_data
;
int
len
,
max_payload_size
;
const
uint8_t
*
access_unit_index
=
NULL
;
const
uint64_t
delay
=
av_rescale
(
s
->
max_delay
,
90000
,
AV_TIME_BASE
);
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_SUBTITLE
)
{
/* for subtitle, a single PES packet must be generated */
...
...
@@ -717,8 +718,8 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
if
(
access_unit_index
&&
access_unit_index
<
buf
&&
ts_st
->
payload_pts
==
AV_NOPTS_VALUE
&&
ts_st
->
payload_dts
==
AV_NOPTS_VALUE
)
{
ts_st
->
payload_dts
=
pkt
->
dts
;
ts_st
->
payload_pts
=
pkt
->
pts
;
ts_st
->
payload_dts
=
pkt
->
dts
+
delay
;
ts_st
->
payload_pts
=
pkt
->
pts
+
delay
;
}
if
(
ts_st
->
payload_index
>=
max_payload_size
)
{
mpegts_write_pes
(
s
,
st
,
ts_st
->
payload
,
ts_st
->
payload_index
,
...
...
tests/libav.regression.ref
View file @
46911c7a
...
...
@@ -9,7 +9,7 @@ c351132527ccb1e8cab06cc0822fde23 *./tests/data/b-libav.rm
bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg
378880 ./tests/data/b-libav.mpg
./tests/data/b-libav.mpg CRC=0x2b71a386
d1ab4041e32fb802bb164844d91cc5fe
*./tests/data/b-libav.ts
9fd96456cbf2a550da816e563316d92f
*./tests/data/b-libav.ts
471692 ./tests/data/b-libav.ts
./tests/data/b-libav.ts CRC=0xcc4948e1
1b28a16652bb8ac528b33f7478ca18b6 *./tests/data/b-libav.swf
...
...
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