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
484d42a0
Commit
484d42a0
authored
Nov 18, 2014
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/concatdec: add timestamp log
Help debugging timestamp conversion issues.
parent
9f6d48d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
concatdec.c
libavformat/concatdec.c
+11
-0
No files found.
libavformat/concatdec.c
View file @
484d42a0
...
...
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/timestamp.h"
#include "avformat.h"
#include "internal.h"
#include "url.h"
...
...
@@ -479,6 +480,7 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
int
ret
;
int64_t
delta
;
ConcatStream
*
cs
;
AVStream
*
st
;
while
(
1
)
{
ret
=
av_read_frame
(
cat
->
avf
,
pkt
);
...
...
@@ -504,6 +506,12 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
if
((
ret
=
filter_packet
(
avf
,
cs
,
pkt
)))
return
ret
;
st
=
cat
->
avf
->
streams
[
pkt
->
stream_index
];
av_log
(
avf
,
AV_LOG_DEBUG
,
"file:%d stream:%d pts:%s pts_time:%s dts:%s dts_time:%s"
,
(
unsigned
)(
cat
->
cur_file
-
cat
->
files
),
pkt
->
stream_index
,
av_ts2str
(
pkt
->
pts
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
),
av_ts2str
(
pkt
->
dts
),
av_ts2timestr
(
pkt
->
dts
,
&
st
->
time_base
));
delta
=
av_rescale_q
(
cat
->
cur_file
->
start_time
-
cat
->
avf
->
start_time
,
AV_TIME_BASE_Q
,
cat
->
avf
->
streams
[
pkt
->
stream_index
]
->
time_base
);
...
...
@@ -511,6 +519,9 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
pkt
->
pts
+=
delta
;
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
pkt
->
dts
+=
delta
;
av_log
(
avf
,
AV_LOG_DEBUG
,
" -> pts:%s pts_time:%s dts:%s dts_time:%s
\n
"
,
av_ts2str
(
pkt
->
pts
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
),
av_ts2str
(
pkt
->
dts
),
av_ts2timestr
(
pkt
->
dts
,
&
st
->
time_base
));
return
ret
;
}
...
...
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