Check that there are subtitle rects to encode in avcodec_encode_subtitle()

Patch by Björn Axelsson ( gecko A acc D umu D se )

Originally committed as revision 17093 to svn://svn.ffmpeg.org/ffmpeg/trunk
