diff --git a/libavformat/utils.c b/libavformat/utils.c index c4ade6f33e4ac0bd645120ecef79b94fc1913b50..b5693b5da37ac541c8090891b6d900c65511f312 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -608,6 +608,9 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, int6 if(pktl->pkt.dts != AV_NOPTS_VALUE) pktl->pkt.dts += st->first_dts; + + if(st->start_time == AV_NOPTS_VALUE && pktl->pkt.pts != AV_NOPTS_VALUE) + st->start_time= pktl->pkt.pts; } }