Interfacing IR RC5 remote with STM32
Change the line:

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;


To this:

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;


To complete connection of the input capture alternative function mode.