File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1836,10 +1836,6 @@ void FFmpegWriter::write_audio_packets(bool is_final) {
18361836 audio_encoder_buffer_size, 0 );
18371837 }
18381838
1839- // Increment PTS (in samples)
1840- write_audio_count += FFMIN (audio_input_frame_size, audio_input_position);
1841- frame_final->pts = write_audio_count; // Set the AVFrame's PTS
1842-
18431839 // Init the packet
18441840 AVPacket pkt;
18451841 av_init_packet (&pkt);
@@ -1911,6 +1907,10 @@ void FFmpegWriter::write_audio_packets(bool is_final) {
19111907 ZmqLogger::Instance ()->AppendDebugMethod (" FFmpegWriter::write_audio_packets ERROR [" + (std::string) av_err2str (error_code) + " ]" , " error_code" , error_code);
19121908 }
19131909
1910+ // Increment PTS (in samples)
1911+ write_audio_count += FFMIN (audio_input_frame_size, audio_input_position);
1912+ frame_final->pts = write_audio_count; // Set the AVFrame's PTS
1913+
19141914 // deallocate AVFrame
19151915 av_freep (&(frame_final->data [0 ]));
19161916 AV_FREE_FRAME (&frame_final);
You can’t perform that action at this time.
0 commit comments