avcodec/mpegvideo: fix buffer clear code so it should work with negative linesizes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264: clear chroma planes when flags gray is used

Fixes Ticket3397
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>