1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-03 14:32:16 +02:00

fftools/ffmpeg: call check_recording_time() with actual frame pts

Not its estimated value that will not necessarily be used.
This commit is contained in:
Anton Khirnov 2022-11-25 23:47:12 +01:00
parent 86a71d6b3c
commit 617ea07c22

View File

@ -936,9 +936,6 @@ static void do_audio_out(OutputFile *of, OutputStream *ost,
AVCodecContext *enc = ost->enc_ctx;
int ret;
if (!check_recording_time(ost, ost->next_pts, ost->enc_ctx->time_base))
return;
if (frame->pts == AV_NOPTS_VALUE)
frame->pts = ost->next_pts;
else {
@ -949,6 +946,9 @@ static void do_audio_out(OutputFile *of, OutputStream *ost,
}
frame->time_base = enc->time_base;
if (!check_recording_time(ost, frame->pts, frame->time_base))
return;
ost->next_pts = frame->pts + frame->nb_samples;
ret = submit_encode_frame(of, ost, frame);