mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-15 21:32:12 +08:00
lavf/utils.c: Don't compute start_time from DISCARD packets for video.
Signed-off-by: Sasi Inguva <isasi@isasi.mtv.corp.google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:

committed by
Michael Niedermayer

parent
dc99ee6b08
commit
829aebf95d
@@ -1158,7 +1158,9 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
||||
}
|
||||
|
||||
if (st->start_time == AV_NOPTS_VALUE) {
|
||||
st->start_time = pts;
|
||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || !(pkt->flags & AV_PKT_FLAG_DISCARD)) {
|
||||
st->start_time = pts;
|
||||
}
|
||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->codecpar->sample_rate)
|
||||
st->start_time += av_rescale_q(st->skip_samples, (AVRational){1, st->codecpar->sample_rate}, st->time_base);
|
||||
}
|
||||
|
Reference in New Issue
Block a user