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

Function rm_read_multi

libavformat/rmdec.c:509–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509static int rm_read_multi(AVFormatContext *s, AVIOContext *pb,
510 AVStream *st, char *mime)
511{
512 int number_of_streams = avio_rb16(pb);
513 int number_of_mdpr;
514 int i, ret;
515 unsigned size2;
516 for (i = 0; i<number_of_streams; i++)
517 avio_rb16(pb);
518 number_of_mdpr = avio_rb16(pb);
519 if (number_of_mdpr != 1) {
520 avpriv_request_sample(s, "MLTI with multiple (%d) MDPR", number_of_mdpr);
521 }
522 for (i = 0; i < number_of_mdpr; i++) {
523 AVStream *st2;
524 if (i > 0) {
525 st2 = avformat_new_stream(s, NULL);
526 if (!st2) {
527 ret = AVERROR(ENOMEM);
528 return ret;
529 }
530 st2->id = st->id + (i<<16);
531 st2->codecpar->bit_rate = st->codecpar->bit_rate;
532 st2->start_time = st->start_time;
533 st2->duration = st->duration;
534 st2->codecpar->codec_type = AVMEDIA_TYPE_DATA;
535 st2->priv_data = ff_rm_alloc_rmstream();
536 if (!st2->priv_data)
537 return AVERROR(ENOMEM);
538 } else
539 st2 = st;
540
541 size2 = avio_rb32(pb);
542 ret = ff_rm_read_mdpr_codecdata(s, s->pb, st2, st2->priv_data,
543 size2, NULL);
544 if (ret < 0)
545 return ret;
546 }
547 return 0;
548}
549
550static int rm_read_header(AVFormatContext *s)
551{

Callers 2

rm_read_headerFunction · 0.85
ivr_read_headerFunction · 0.85

Calls 6

avio_rb16Function · 0.85
avpriv_request_sampleFunction · 0.85
avformat_new_streamFunction · 0.85
ff_rm_alloc_rmstreamFunction · 0.85
avio_rb32Function · 0.85

Tested by

no test coverage detected