MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / write_packet_common

Function write_packet_common

libavformat/mux.c:1094–1116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092}
1093
1094static int write_packet_common(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved)
1095{
1096 int ret;
1097
1098 if (s->debug & FF_FDEBUG_TS)
1099 av_log(s, AV_LOG_DEBUG, "%s size:%d dts:%s pts:%s\n", __func__,
1100 pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
1101
1102 guess_pkt_duration(s, st, pkt);
1103
1104#if FF_API_COMPUTE_PKT_FIELDS2
1105 if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
1106 return ret;
1107#endif
1108
1109 if (interleaved) {
1110 if (pkt->dts == AV_NOPTS_VALUE && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
1111 return AVERROR(EINVAL);
1112 return interleaved_write_packet(s, pkt, 0, 1);
1113 } else {
1114 return write_packet(s, pkt);
1115 }
1116}
1117
1118static int write_packets_from_bsfs(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved)
1119{

Callers 2

write_packets_from_bsfsFunction · 0.85
write_packets_commonFunction · 0.85

Calls 5

av_logFunction · 0.85
guess_pkt_durationFunction · 0.85
compute_muxer_pkt_fieldsFunction · 0.85
interleaved_write_packetFunction · 0.85
write_packetFunction · 0.70

Tested by

no test coverage detected