channels: Don't send gfx capversion 10 if AVC420 is requested
authorMartin Fleisz <martin.fleisz@thincast.com>
Mon, 11 Sep 2017 10:05:03 +0000 (12:05 +0200)
committerMartin Fleisz <martin.fleisz@thincast.com>
Mon, 11 Sep 2017 10:05:03 +0000 (12:05 +0200)
channels/rdpgfx/client/rdpgfx_main.c

index 040fa5c..6bd1145 100644 (file)
@@ -92,24 +92,27 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
                capsSet->flags |= RDPGFX_CAPS_FLAG_AVC420_ENABLED;
 #endif
 
-       capsSet = &capsSets[pdu.capsSetCount++];
-       capsSet->version = RDPGFX_CAPVERSION_10;
-       capsSet->flags = 0;
+       if (!gfx->H264 || gfx->AVC444)
+       {
+               capsSet = &capsSets[pdu.capsSetCount++];
+               capsSet->version = RDPGFX_CAPVERSION_10;
+               capsSet->flags = 0;
 
-       if (gfx->SmallCache)
-               capsSet->flags |= RDPGFX_CAPS_FLAG_SMALL_CACHE;
+               if (gfx->SmallCache)
+                       capsSet->flags |= RDPGFX_CAPS_FLAG_SMALL_CACHE;
 
 #ifdef WITH_GFX_H264
-       if (!gfx->AVC444)
-               capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED;
+               if (!gfx->AVC444)
+                       capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED;
 #else
-       capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED;
+               capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED;
 #endif
 
-       capsSets[pdu.capsSetCount] = *capsSet;
-       capsSets[pdu.capsSetCount++].version = RDPGFX_CAPVERSION_102;
-       capsSets[pdu.capsSetCount] = *capsSet;
-       capsSets[pdu.capsSetCount++].version = RDPGFX_CAPVERSION_103;
+               capsSets[pdu.capsSetCount] = *capsSet;
+               capsSets[pdu.capsSetCount++].version = RDPGFX_CAPVERSION_102;
+               capsSets[pdu.capsSetCount] = *capsSet;
+               capsSets[pdu.capsSetCount++].version = RDPGFX_CAPVERSION_103;
+       }
 
        header.pduLength = RDPGFX_HEADER_SIZE + 2 + (pdu.capsSetCount *
                           RDPGFX_CAPSET_SIZE);