| 1263 | }; |
| 1264 | |
| 1265 | static 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 | |
| 1290 | static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st, AVDictionary **opts_used) |
| 1291 | { |
no test coverage detected