Cleanup replay packets after use
This commit is contained in:
parent
e301925d98
commit
10d7bf93e8
@ -2048,6 +2048,10 @@ int main(int argc, char **argv) {
|
||||
if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
|
||||
save_replay_thread.get();
|
||||
puts(save_replay_output_filepath.c_str());
|
||||
std::lock_guard<std::mutex> lock(write_output_mutex);
|
||||
for(AVPacket &packet : save_replay_packets) {
|
||||
av_packet_unref(&packet);
|
||||
}
|
||||
save_replay_packets.clear();
|
||||
}
|
||||
|
||||
@ -2068,6 +2072,11 @@ int main(int argc, char **argv) {
|
||||
if(save_replay_thread.valid()) {
|
||||
save_replay_thread.get();
|
||||
puts(save_replay_output_filepath.c_str());
|
||||
std::lock_guard<std::mutex> lock(write_output_mutex);
|
||||
for(AVPacket &packet : save_replay_packets) {
|
||||
av_packet_unref(&packet);
|
||||
}
|
||||
save_replay_packets.clear();
|
||||
}
|
||||
|
||||
for(AudioTrack &audio_track : audio_tracks) {
|
||||
|
Loading…
Reference in New Issue
Block a user