Skip to content

Commit

Permalink
Allow using the subtitle consumer interface with JRVR
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Feb 8, 2022
1 parent 642bf12 commit 7a5e78d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions decoder/LAVVideo/LAVVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,20 @@ HRESULT CLAVVideo::StartStreaming()
strVersion));

// only support madVR for now, and only recent versions (anything before 0.89.10 crashes)
if (strName && strVersion && wcscmp(strName, L"madVR") == 0)
if (strName && strVersion)
{
int major, minor, build, rev;
if (swscanf_s(strVersion, L"%d.%d.%d.%d", &major, &minor, &build, &rev) == 4)
if (wcscmp(strName, L"madVR") == 0)
{
if (major > 0 || (major == 0 && (minor > 89 || (minor == 89 && build >= 10))))
bFoundConsumer = true;
int major, minor, build, rev;
if (swscanf_s(strVersion, L"%d.%d.%d.%d", &major, &minor, &build, &rev) == 4)
{
if (major > 0 || (major == 0 && (minor > 89 || (minor == 89 && build >= 10))))
bFoundConsumer = true;
}
}
else if (wcscmp(strName, L"JRVR") == 0)
{
bFoundConsumer = true;
}
}

Expand Down

0 comments on commit 7a5e78d

Please sign in to comment.