avcodec: check that rawvideo output is aligned properly, and correct if necessary

Fixes a crash with the SSE2 conversion routines, which implicitly require
an aligned source buffer.