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
e0c91bc2
Commit
e0c91bc2
authored
Oct 03, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial dts fix
Originally committed as revision 3555 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2031ba1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
16 deletions
+3
-16
mpeg.c
libavformat/mpeg.c
+0
-13
utils.c
libavformat/utils.c
+2
-2
libav.regression.ref
tests/libav.regression.ref
+1
-1
No files found.
libavformat/mpeg.c
View file @
e0c91bc2
...
...
@@ -1016,19 +1016,6 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
pts
=
pkt
->
pts
;
dts
=
pkt
->
dts
;
if
(
s
->
is_svcd
)
{
/* offset pts and dts slightly into the future to be able
to do the compatibility fix below.*/
pts
+=
2
;
dts
+=
2
;
if
(
stream
->
packet_number
==
0
&&
dts
==
pts
)
/* For the very first packet we want to force the DTS to be included.
This increases compatibility with lots of DVD players.
Since the MPEG-2 standard mandates that DTS is only written when
it is different from PTS we have to move it slightly into the past.*/
dts
-=
2
;
}
if
(
s
->
is_vcd
)
{
/* We have to offset the PTS, so that it is consistent with the SCR.
SCR starts at 36000, but the first two packs contain only padding
...
...
libavformat/utils.c
View file @
e0c91bc2
...
...
@@ -1979,8 +1979,8 @@ static void compute_pkt_fields2(AVStream *st, AVPacket *pkt){
static
void
truncate_ts
(
AVStream
*
st
,
AVPacket
*
pkt
){
int64_t
pts_mask
=
(
2LL
<<
(
st
->
pts_wrap_bits
-
1
))
-
1
;
if
(
pkt
->
dts
<
0
)
pkt
->
dts
=
0
;
//this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
//
if(pkt->dts < 0)
//
pkt->dts= 0; //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
pkt
->
pts
&=
pts_mask
;
pkt
->
dts
&=
pts_mask
;
...
...
tests/libav.regression.ref
View file @
e0c91bc2
...
...
@@ -7,7 +7,7 @@ ffmpeg regression test
./data/b-libav.asf CRC=750f18c7
1cbf838e659d7fc3d3e33f4187b91f6c *./data/b-libav.rm
360251 ./data/b-libav.rm
65af12e9d9e8eb76af5efdadf769d7d7
*./data/b-libav.mpg
7aeebe6bf43c0c1219e41ce082a47051
*./data/b-libav.mpg
387072 ./data/b-libav.mpg
./data/b-libav.mpg CRC=16c74225
57a8dfc7926802bb337a9d8918de94a8 *./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