Ensure that width and height are > 0. avcodec_open() itself only checks that
they are >= 0.

Patch by Sebastian Vater <cdgs basty googlemail com>.

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