Fix messed up audio pts when merging audio
This commit is contained in:
parent
895768104f
commit
f2ae6eb05e
@ -1951,9 +1951,6 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
int err = 0;
|
int err = 0;
|
||||||
while ((err = av_buffersink_get_frame(audio_track.sink, aframe)) >= 0) {
|
while ((err = av_buffersink_get_frame(audio_track.sink, aframe)) >= 0) {
|
||||||
aframe->pts = audio_track.pts;
|
|
||||||
audio_track.pts += audio_track.codec_context->frame_size;
|
|
||||||
|
|
||||||
if(framerate_mode == FramerateMode::CONSTANT) {
|
if(framerate_mode == FramerateMode::CONSTANT) {
|
||||||
aframe->pts = audio_track.pts;
|
aframe->pts = audio_track.pts;
|
||||||
audio_track.pts += audio_track.codec_context->frame_size;
|
audio_track.pts += audio_track.codec_context->frame_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user