mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
fftools/sync_queue: update audio frame duration when re-chunking
This commit is contained in:
parent
b088d59347
commit
9a44e0335c
1 changed files with 5 additions and 1 deletions
|
|
@ -431,7 +431,7 @@ static int receive_samples(SyncQueue *sq, SyncQueueStream *st,
|
|||
offset_audio(src.f, nb_samples);
|
||||
st->samples_queued -= nb_samples;
|
||||
|
||||
return 0;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
// otherwise allocate a new frame and copy the data
|
||||
|
|
@ -474,6 +474,10 @@ static int receive_samples(SyncQueue *sq, SyncQueueStream *st,
|
|||
dst->nb_samples += to_copy;
|
||||
}
|
||||
|
||||
finish:
|
||||
dst->duration = av_rescale_q(nb_samples, (AVRational){ 1, dst->sample_rate },
|
||||
dst->time_base);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue