From 27471ab5aa211b63efd31579f93cc3824b475cc0 Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Tue, 10 Sep 2013 14:02:01 +0200 Subject: [PATCH] Fixed codec selection in HTTP Smooth. --- src/connectors/conn_http_smooth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connectors/conn_http_smooth.cpp b/src/connectors/conn_http_smooth.cpp index 8fa5e27b..ba357f20 100644 --- a/src/connectors/conn_http_smooth.cpp +++ b/src/connectors/conn_http_smooth.cpp @@ -55,10 +55,10 @@ namespace Connector_HTTP { long long int minWidth = 99999999; long long int minHeight = 99999999; 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; } - if (oIt->second["type"].asString() == "video"){ + if (oIt->second["type"].asString() == "video" && oIt->second["codec"].asString() == "AAC"){ allVideo[oIt->first] = oIt->second; if (oIt->second["width"].asInt() > maxWidth){maxWidth = oIt->second["width"].asInt();} if (oIt->second["width"].asInt() < minWidth){minWidth = oIt->second["width"].asInt();}