| 353 | } |
| 354 | |
| 355 | static 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 | |
| 378 | static int write_header(AVFormatContext *s) |
| 379 | { |
no test coverage detected