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

Function demux_stream_alloc

fftools/ffmpeg_demux.c:1265–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1263};
1264
1265static DemuxStream *demux_stream_alloc(Demuxer *d, AVStream *st)
1266{
1267 const char *type_str = av_get_media_type_string(st->codecpar->codec_type);
1268 InputFile *f = &d->f;
1269 DemuxStream *ds;
1270
1271 ds = allocate_array_elem(&f->streams, sizeof(*ds), &f->nb_streams);
1272 if (!ds)
1273 return NULL;
1274
1275 ds->sch_idx_stream = -1;
1276 ds->sch_idx_dec = -1;
1277
1278 ds->ist.st = st;
1279 ds->ist.file = f;
1280 ds->ist.index = st->index;
1281 ds->ist.class = &input_stream_class;
1282
1283 snprintf(ds->log_name, sizeof(ds->log_name), "%cist#%d:%d/%s",
1284 type_str ? *type_str : '?', d->f.index, st->index,
1285 avcodec_get_name(st->codecpar->codec_id));
1286
1287 return ds;
1288}
1289
1290static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st, AVDictionary **opts_used)
1291{

Callers 1

ist_addFunction · 0.85

Calls 3

av_get_media_type_stringFunction · 0.85
allocate_array_elemFunction · 0.85
avcodec_get_nameFunction · 0.85

Tested by

no test coverage detected