Skip to content

Commit

Permalink
Do not fail to open a file just because we fail to parse subtitle hea…
Browse files Browse the repository at this point in the history
…der.
  • Loading branch information
desjare committed Sep 28, 2019
1 parent b899f19 commit d3451a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mediadecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -931,10 +931,10 @@ namespace mediadecoder
std::string ssa(reinterpret_cast<char*>(codecContext->subtitle_header), codecContext->subtitle_header_size);
subtitle::SubStationAlphaHeader* subtitleHeader = nullptr;

result = subtitle::Parse(ssa, subtitleHeader);
if(!result)
Result subtitleResult = subtitle::Parse(ssa, subtitleHeader);
if(!subtitleResult)
{
logger::Error("Could not parse ass subtitle header %s", result.getError());
logger::Error("Could not parse ass subtitle header %s", subtitleResult.getError());
delete subtitleStream; subtitleStream = nullptr;
continue;
}
Expand Down

0 comments on commit d3451a1

Please sign in to comment.