diff --git a/src/connectors/conn_http_dynamic.cpp b/src/connectors/conn_http_dynamic.cpp index 3cc173e4..fa33cd1e 100644 --- a/src/connectors/conn_http_dynamic.cpp +++ b/src/connectors/conn_http_dynamic.cpp @@ -32,10 +32,10 @@ namespace Connector_HTTP { void getTracks(DTSC::Meta & metadata){ videoTracks.clear(); for (std::map::iterator it = metadata.tracks.begin(); it != metadata.tracks.end(); it++){ - if (it->second.type == "video"){ + if (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6"){ videoTracks.insert(it->first); } - if (it->second.type == "audio"){ + if (it->second.codec == "AAC" || it->second.codec == "MP3"){ audioTrack = it->first; } } diff --git a/src/connectors/conn_http_progressive_flv.cpp b/src/connectors/conn_http_progressive_flv.cpp index ff97b5c6..4ca7d66e 100644 --- a/src/connectors/conn_http_progressive_flv.cpp +++ b/src/connectors/conn_http_progressive_flv.cpp @@ -102,10 +102,10 @@ namespace Connector_HTTP { Strm.waitForMeta(ss); int byterate = 0; for (std::map::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){ - if (videoID == -1 && it->second.type == "video"){ + if (videoID == -1 && (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6")){ videoID = it->second.trackID; } - if (audioID == -1 && it->second.type == "audio"){ + if (audioID == -1 && (it->second.codec == "AAC" || it->second.codec == "MP3")){ audioID = it->second.trackID; } } diff --git a/src/connectors/conn_rtmp.cpp b/src/connectors/conn_rtmp.cpp index 0304b862..8992869a 100644 --- a/src/connectors/conn_rtmp.cpp +++ b/src/connectors/conn_rtmp.cpp @@ -567,10 +567,10 @@ namespace Connector_RTMP { Strm.waitForMeta(ss); //find first audio and video tracks for (std::map::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){ - if (videoID == -1 && it->second.type == "video"){ + if (videoID == -1 && (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6")){ videoID = it->second.trackID; } - if (audioID == -1 && it->second.type == "audio"){ + if (audioID == -1 && (it->second.codec == "AAC" || it->second.codec == "MP3")){ audioID = it->second.trackID; } } diff --git a/src/connectors/conn_ts.cpp b/src/connectors/conn_ts.cpp index aaaf7414..f00ff4b7 100644 --- a/src/connectors/conn_ts.cpp +++ b/src/connectors/conn_ts.cpp @@ -68,12 +68,12 @@ namespace Connector_TS { Strm.waitForMeta(ss); for (std::map::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){ - if (audioID == -1 && it->second.type == "audio"){ + if (audioID == -1 && it->second.codec == "AAC"){ audioID = it->first; tmpTracks << " " << it->first; } - if (videoID == -1 && it->second.type == "video"){ + if (videoID == -1 && it->second.codec == "H264"){ videoID = it->first; tmpTracks << " " << it->first; }