ffmpeg: stricter refcount check in unref_buffer()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>