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

Function write_stream_data

libavformat/wtvenc.c:355–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355static int write_stream_data(AVFormatContext *s, AVStream *st)
356{
357 AVIOContext *pb = s->pb;
358 int ret;
359
360 write_chunk_header2(s, &ff_SBE2_STREAM_DESC_EVENT, 0x80000000 | (st->index + INDEX_BASE));
361 avio_wl32(pb, 0x00000001);
362 avio_wl32(pb, st->index + INDEX_BASE); //stream_id
363 avio_wl32(pb, 0x00000001);
364 write_pad(pb, 8);
365
366 ret = write_stream_codec_info(s, st);
367 if (ret < 0) {
368 av_log(s, AV_LOG_ERROR, "write stream codec info failed codec_type(0x%x)\n", st->codecpar->codec_type);
369 return -1;
370 }
371 finish_chunk(s);
372
373 avpriv_set_pts_info(st, 64, 1, 10000000);
374
375 return 0;
376}
377
378static int write_header(AVFormatContext *s)
379{

Callers 1

write_headerFunction · 0.85

Calls 6

write_chunk_header2Function · 0.85
avio_wl32Function · 0.85
write_stream_codec_infoFunction · 0.85
av_logFunction · 0.85
finish_chunkFunction · 0.85
avpriv_set_pts_infoFunction · 0.85

Tested by

no test coverage detected