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

Function map_auto_data

fftools/ffmpeg_mux_init.c:1794–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1792}
1793
1794static int map_auto_data(Muxer *mux, const OptionsContext *o)
1795{
1796 AVFormatContext *oc = mux->fc;
1797 /* Data only if codec id match */
1798 enum AVCodecID codec_id = av_guess_codec(oc->oformat, NULL, oc->url, NULL, AVMEDIA_TYPE_DATA);
1799
1800 if (codec_id == AV_CODEC_ID_NONE)
1801 return 0;
1802
1803 for (InputStream *ist = ist_iter(NULL); ist; ist = ist_iter(ist)) {
1804 if (ist->user_set_discard == AVDISCARD_ALL)
1805 continue;
1806 if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA &&
1807 ist->st->codecpar->codec_id == codec_id) {
1808 int ret = ost_add(mux, o, AVMEDIA_TYPE_DATA, ist, NULL, NULL, NULL);
1809 if (ret < 0)
1810 return ret;
1811 }
1812 }
1813
1814 return 0;
1815}
1816
1817static int map_manual(Muxer *mux, const OptionsContext *o, const StreamMap *map)
1818{

Callers

nothing calls this directly

Calls 3

av_guess_codecFunction · 0.85
ist_iterFunction · 0.85
ost_addFunction · 0.85

Tested by

no test coverage detected