Fixed codec selection in HTTP Smooth.

This commit is contained in:
Erik Zandvliet 2013-09-10 14:02:01 +02:00
parent 04997394f0
commit 27471ab5aa

View file

@ -55,10 +55,10 @@ namespace Connector_HTTP {
long long int minWidth = 99999999; long long int minWidth = 99999999;
long long int minHeight = 99999999; long long int minHeight = 99999999;
for (JSON::ObjIter oIt = metadata["tracks"].ObjBegin(); oIt != metadata["tracks"].ObjEnd(); oIt++){ for (JSON::ObjIter oIt = metadata["tracks"].ObjBegin(); oIt != metadata["tracks"].ObjEnd(); oIt++){
if (oIt->second["type"].asString() == "audio"){ if (oIt->second["type"].asString() == "audio" && oIt->second["codec"].asString() == "H264"){
allAudio[oIt->first] = oIt->second; allAudio[oIt->first] = oIt->second;
} }
if (oIt->second["type"].asString() == "video"){ if (oIt->second["type"].asString() == "video" && oIt->second["codec"].asString() == "AAC"){
allVideo[oIt->first] = oIt->second; allVideo[oIt->first] = oIt->second;
if (oIt->second["width"].asInt() > maxWidth){maxWidth = oIt->second["width"].asInt();} if (oIt->second["width"].asInt() > maxWidth){maxWidth = oIt->second["width"].asInt();}
if (oIt->second["width"].asInt() < minWidth){minWidth = oIt->second["width"].asInt();} if (oIt->second["width"].asInt() < minWidth){minWidth = oIt->second["width"].asInt();}