Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libavformat/dashenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,9 +2068,17 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt)
// If we wrote a previous segment, adjust the start time of the segment
// to the end of the previous one (which is the same as the mp4 muxer
// does). This avoids gaps in the timeline.
#if 0
/*
* Initializing start_pts with max_pts can cause some problem in very odd cases (RM).
* For example with fry's video transcoding max_pts starts to drift 1001 ts after second segment.
* The following change set forces start_pts of the segment to be pkt->pts of the first packet in the segment.
*/
if (os->max_pts != AV_NOPTS_VALUE)
os->start_pts = os->max_pts;
else
#endif
av_log(s, AV_LOG_INFO, "SETTING START_PTS pkt->pts=%"PRId64", max_pts=%"PRId64, pkt->pts, os->max_pts);
os->start_pts = pkt->pts;
}
if (os->max_pts == AV_NOPTS_VALUE)
Expand Down