Set reference flag for frames. Originally committed as revision 2460 to svn://svn.ffmpeg.org/ffmpeg/trunk