Only realloc() bitstream buffer when the needed size increased,
this is needed to prevent loosing bitstream data with large metadata.

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