Fix valgrind invalid read on top MB rows with CODEC_FLAG_EMU_EDGE set.
Originally committed as revision 26168 to svn://svn.ffmpeg.org/ffmpeg/trunk