swr/dither: fix division by 0

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h264: don t leave stale pointers in delayed_pic in flush_changes.

Fixes null pointer dereference & assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>