Skip to content

Commit

Permalink
fix(HlsParser): fix get stream type error
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Feb 26, 2020
1 parent f2f74d5 commit 31e8172
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions framework/demuxer/play_list/HlsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ namespace Cicada {
bool mixedVideo = false;
bool mixedAudio = false;

if ((codecAttr->value.find_first_of("avc") != std::string::npos
|| codecAttr->value.find_first_of("hvc") != std::string::npos)
if ((codecAttr->value.find("avc") != std::string::npos
|| codecAttr->value.find("hvc") != std::string::npos)
&& !videoAttr) {
mixedVideo = true;
}

if ((codecAttr->value.find_first_of("mp4a") != std::string::npos
|| codecAttr->value.find_first_of("ac-3") != std::string::npos
|| codecAttr->value.find_first_of("ec-3") != std::string::npos
if ((codecAttr->value.find("mp4a") != std::string::npos
|| codecAttr->value.find("ac-3") != std::string::npos
|| codecAttr->value.find("ec-3") != std::string::npos
)
&& !audioAttr) {
mixedAudio = true;
Expand Down

0 comments on commit 31e8172

Please sign in to comment.