File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -293,8 +293,7 @@ void AudioEncoder::encode() {
293293 encodeInnerLoop (autoAVPacket, convertedAVFrame);
294294
295295 numEncodedSamples += numSamplesToEncode;
296- // TODO-ENCODING set frame pts correctly, and test against it.
297- // avFrame->pts += static_cast<int64_t>(numSamplesToEncode);
296+ avFrame->pts += static_cast <int64_t >(numSamplesToEncode);
298297 }
299298 TORCH_CHECK (numEncodedSamples == numSamples, " Hmmmmmm something went wrong." );
300299
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ UniqueAVFrame convertAudioAVFrameSamples(
274274 convertedAVFrame,
275275 " Could not allocate frame for sample format conversion." );
276276
277+ convertedAVFrame->pts = srcAVFrame->pts ;
277278 convertedAVFrame->format = static_cast <int >(outSampleFormat);
278279
279280 convertedAVFrame->sample_rate = outSampleRate;
You can’t perform that action at this time.
0 commit comments