[MPlayer-cvslog] r38140 - trunk/libvo/vo_kva.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri May 24 23:13:02 EEST 2019


On Fri, May 24, 2019 at 01:42:54PM +0300, komh wrote:
> -    PCSZ pcszVideoModeStr[3] = {"DIVE", "WarpOverlay!", "SNAP", "VMAN"};
> +    PCSZ pcszVideoModeStr[] = {"DIVE", "WarpOverlay!", "SNAP", "VMAN"};

This seems not very robust.
(for reference, the usage is pcszVideoModeStr[m_int.kvac.ulMode - 1]
where ulMode seems to be filled in by the API).
I would suggest to change it to
PCSZ pcszVideoModeStr[] = {"UNKNOWN", "DIVE", "WarpOverlay!", "SNAP", "VMAN"};
and
pcszVideoModeStr[m_int.kvac.ulMode >= sizeof(pcszVideoModeStr)/sizeof(*pcszVideoModeStr) ? 0 : m_int.kvac.ulMode];
and doing the same for ao_kva.c

Best regards,
Reimar Döffinger


More information about the MPlayer-cvslog mailing list