MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / WriteTrailer

Method WriteTrailer

src/FFmpegWriter.cpp:749–767  ·  view source on GitHub ↗

Write the file trailer (after all frames are written)

Source from the content-addressed store, hash-verified

747
748// Write the file trailer (after all frames are written)
749void 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
770void FFmpegWriter::flush_encoders() {

Callers 2

WriteFrameMethod · 0.80
CloseMethod · 0.80

Calls 1

AppendDebugMethodMethod · 0.80

Tested by

no test coverage detected