Fix compilation on Debian 8 with libavcodec

Fixing https://code.google.com/p/dolphin-emu/issues/detail?id=7408
A new version of libavcodec was the problem.

I am a C and C++ beginner, so I might have introduced problems, so my code should be reviewed.
Thanks.
Probably shouldn't randomly change this in the middle of an unrelated pull request. 

Besides, post-increment shouldn't be slower in modern compilers.