You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg: stop using packet pts for decoded audio frame pts
If input packets have timestamps, they will be propagated to output frames by the decoder, so at best this block does not do anything. There can also be an arbitrary amount of delay between packets sent to the decoder and decoded frames (e.g. due to decoder's intrinsic delay or frame threading), so deriving any timestamps from packet properties is wrong.
This commit is contained in:
@@ -911,9 +911,6 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output,
|
|||||||
|
|
||||||
if (decoded_frame->pts != AV_NOPTS_VALUE) {
|
if (decoded_frame->pts != AV_NOPTS_VALUE) {
|
||||||
decoded_frame_tb = ist->st->time_base;
|
decoded_frame_tb = ist->st->time_base;
|
||||||
} else if (pkt && pkt->pts != AV_NOPTS_VALUE) {
|
|
||||||
decoded_frame->pts = pkt->pts;
|
|
||||||
decoded_frame_tb = pkt->time_base;
|
|
||||||
}else {
|
}else {
|
||||||
decoded_frame->pts = ist->dts;
|
decoded_frame->pts = ist->dts;
|
||||||
decoded_frame_tb = AV_TIME_BASE_Q;
|
decoded_frame_tb = AV_TIME_BASE_Q;
|
||||||
|
Reference in New Issue
Block a user