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:
parent
86a71d6b3c
commit
617ea07c22
@ -936,9 +936,6 @@ static void do_audio_out(OutputFile *of, OutputStream *ost,
|
|||||||
AVCodecContext *enc = ost->enc_ctx;
|
AVCodecContext *enc = ost->enc_ctx;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!check_recording_time(ost, ost->next_pts, ost->enc_ctx->time_base))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (frame->pts == AV_NOPTS_VALUE)
|
if (frame->pts == AV_NOPTS_VALUE)
|
||||||
frame->pts = ost->next_pts;
|
frame->pts = ost->next_pts;
|
||||||
else {
|
else {
|
||||||
@ -949,6 +946,9 @@ static void do_audio_out(OutputFile *of, OutputStream *ost,
|
|||||||
}
|
}
|
||||||
frame->time_base = enc->time_base;
|
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;
|
ost->next_pts = frame->pts + frame->nb_samples;
|
||||||
|
|
||||||
ret = submit_encode_frame(of, ost, frame);
|
ret = submit_encode_frame(of, ost, frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user