Write the file trailer (after all frames are written)
| 747 | |
| 748 | // Write the file trailer (after all frames are written) |
| 749 | void FFmpegWriter::WriteTrailer() { |
| 750 | // Process final audio frame (if any) |
| 751 | if (info.has_audio && audio_st) |
| 752 | write_audio_packets(true, NULL); |
| 753 | |
| 754 | // Flush encoders (who sometimes hold on to frames) |
| 755 | flush_encoders(); |
| 756 | |
| 757 | /* write the trailer, if any. The trailer must be written |
| 758 | * before you close the CodecContexts open when you wrote the |
| 759 | * header; otherwise write_trailer may try to use memory that |
| 760 | * was freed on av_codec_close() */ |
| 761 | av_write_trailer(oc); |
| 762 | |
| 763 | // Mark as 'written' |
| 764 | write_trailer = true; |
| 765 | |
| 766 | ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::WriteTrailer"); |
| 767 | } |
| 768 | |
| 769 | // Flush encoders |
| 770 | void FFmpegWriter::flush_encoders() { |
no test coverage detected