Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ecebf6fc
Commit
ecebf6fc
authored
Dec 13, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/segment: provide more debug feedback when a new segment starts
parent
df5f9496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
segment.c
libavformat/segment.c
+10
-4
No files found.
libavformat/segment.c
View file @
ecebf6fc
...
...
@@ -77,6 +77,7 @@ typedef struct {
int
has_video
;
double
start_time
,
end_time
;
int64_t
start_pts
,
start_dts
;
int
is_first_pkt
;
///< tells if it is the first packet in the segment
}
SegmentContext
;
static
void
print_csv_escaped_str
(
AVIOContext
*
ctx
,
const
char
*
str
)
...
...
@@ -176,6 +177,7 @@ static int segment_start(AVFormatContext *s, int write_header)
return
err
;
}
seg
->
is_first_pkt
=
1
;
return
0
;
}
...
...
@@ -439,6 +441,7 @@ static int seg_write_header(AVFormatContext *s)
avio_close
(
oc
->
pb
);
goto
fail
;
}
seg
->
is_first_pkt
=
1
;
if
(
oc
->
avoid_negative_ts
>
0
&&
s
->
avoid_negative_ts
<
0
)
s
->
avoid_negative_ts
=
1
;
...
...
@@ -481,10 +484,6 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
av_compare_ts
(
pkt
->
pts
,
st
->
time_base
,
end_pts
-
seg
->
time_delta
,
AV_TIME_BASE_Q
)
>=
0
&&
pkt
->
flags
&
AV_PKT_FLAG_KEY
)
{
av_log
(
s
,
AV_LOG_DEBUG
,
"Next segment starts with packet stream:%d pts:%"
PRId64
" pts_time:%f
\n
"
,
pkt
->
stream_index
,
pkt
->
pts
,
pkt
->
pts
*
av_q2d
(
st
->
time_base
));
ret
=
segment_end
(
s
,
seg
->
individual_header_trailer
);
if
(
!
ret
)
...
...
@@ -504,6 +503,13 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
(
double
)(
pkt
->
pts
+
pkt
->
duration
)
*
av_q2d
(
st
->
time_base
));
}
if
(
seg
->
is_first_pkt
)
{
av_log
(
s
,
AV_LOG_DEBUG
,
"segment:'%s' starts with packet stream:%d pts:%s pts_time:%s
\n
"
,
seg
->
avf
->
filename
,
pkt
->
stream_index
,
av_ts2str
(
pkt
->
pts
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
));
seg
->
is_first_pkt
=
0
;
}
if
(
seg
->
reset_timestamps
)
{
av_log
(
s
,
AV_LOG_DEBUG
,
"start_pts:%s pts:%s start_dts:%s dts:%s"
,
av_ts2timestr
(
seg
->
start_pts
,
&
AV_TIME_BASE_Q
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
),
...
...
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