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

Function ff_write_chained

libavformat/mux.c:1337–1365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335}
1336
1337int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
1338 AVFormatContext *src, int interleave)
1339{
1340 int64_t pts = pkt->pts, dts = pkt->dts, duration = pkt->duration;
1341 int stream_index = pkt->stream_index;
1342 AVRational time_base = pkt->time_base;
1343 int ret;
1344
1345 pkt->stream_index = dst_stream;
1346
1347 av_packet_rescale_ts(pkt,
1348 src->streams[stream_index]->time_base,
1349 dst->streams[dst_stream]->time_base);
1350
1351 if (!interleave) {
1352 ret = av_write_frame(dst, pkt);
1353 /* We only have to backup and restore the fields that
1354 * we changed ourselves, because av_write_frame() does not
1355 * modify the packet given to it. */
1356 pkt->pts = pts;
1357 pkt->dts = dts;
1358 pkt->duration = duration;
1359 pkt->stream_index = stream_index;
1360 pkt->time_base = time_base;
1361 } else
1362 ret = av_interleaved_write_frame(dst, pkt);
1363
1364 return ret;
1365}
1366
1367static void uncoded_frame_free(void *unused, uint8_t *data)
1368{

Callers 9

ff_mov_add_hinted_packetFunction · 0.85
hls_write_packetFunction · 0.85
seg_write_packetFunction · 0.85
rtsp_write_packetFunction · 0.85
whip_write_packetFunction · 0.85
sap_write_packetFunction · 0.85
ism_write_packetFunction · 0.85
dash_write_packetFunction · 0.85
hds_write_packetFunction · 0.85

Calls 3

av_packet_rescale_tsFunction · 0.85
av_write_frameFunction · 0.85

Tested by

no test coverage detected