| 1792 | } |
| 1793 | |
| 1794 | static 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 | |
| 1817 | static int map_manual(Muxer *mux, const OptionsContext *o, const StreamMap *map) |
| 1818 | { |
nothing calls this directly
no test coverage detected