# HG changeset patch # User Alain Mazy # Date 1733235655 -3600 # Node ID dfd5effec064b273b6404be0fd9d95f41c00e218 # Parent f622e5964cfa0b0cf4d6afa91eb0ea08082ab289 Get-SCP: accept more transcoding diff -r f622e5964cfa -r dfd5effec064 OrthancServer/Sources/OrthancGetRequestHandler.cpp --- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue Dec 03 15:19:55 2024 +0100 +++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue Dec 03 15:20:55 2024 +0100 @@ -165,6 +165,7 @@ * 2. Select the preferred transfer syntaxes, which corresponds to * the source transfer syntax, plus all the uncompressed transfer * syntaxes if transcoding is enabled. + * This way, we minimize the transcoding on our side. **/ std::list preferred; @@ -208,7 +209,16 @@ } } - // No preferred syntax was accepted + // No preferred syntax was accepted but, if a PC has been accepted, it means that we have accepted a TS. + // This maybe means that we need to transcode twice on our side (from a compressed format to another compressed format). + if (allowTranscoding && accepted.size() > 0) + { + Accepted::const_iterator it = accepted.begin(); + selectedPresentationId = it->second; + selectedSyntax = it->first; + return true; + } + return false; }